diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2022-05-09 21:36:44 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-05-11 23:51:48 -0400 |
commit | 85b5988dc71d8c01b60423ec1a7dbb03830365d0 (patch) | |
tree | 1761ad5c06a296d3eb1ea8026265cbafa7d7fa31 | |
parent | dbfee2a2992f4c7b1c7e8b8746eec91941c50515 (diff) | |
download | lighttpd-git-85b5988dc71d8c01b60423ec1a7dbb03830365d0.tar.gz |
[multiple] use preferred syntax for Content-Type
use preferred syntax for Content-Type: .../charset=...
(match preferred syntax specified in upcoming HTTP spec revision)
-rwxr-xr-x | doc/scripts/create-mime.conf.pl | 4 | ||||
-rw-r--r-- | src/mod_dirlisting.c | 2 | ||||
-rw-r--r-- | src/mod_webdav.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/scripts/create-mime.conf.pl b/doc/scripts/create-mime.conf.pl index dcadf297..d38e996d 100755 --- a/doc/scripts/create-mime.conf.pl +++ b/doc/scripts/create-mime.conf.pl @@ -9,7 +9,7 @@ use strict; my $verbose = 0; foreach (@ARGV) { $verbose = 1 if ($_ eq "-v"); } -# text/* subtypes to serve as "text/...; charset=utf-8" +# text/* subtypes to serve as "text/...;charset=utf-8" # text/html IS NOT INCLUDED: html has its own method for defining charset # (<meta>), but the standards specify that content-type in HTTP wins over # the setting in the html document. @@ -147,7 +147,7 @@ sub add { sub print_type { my ($extension, $mimetype) = @_; if ($mimetype =~ /^text\/(.*)$/) { - $mimetype .= "; charset=utf-8" if $text_utf8{$1}; + $mimetype .= ";charset=utf-8" if $text_utf8{$1}; } print "\t\"${extension}\" => \"${mimetype}\",\n"; diff --git a/src/mod_dirlisting.c b/src/mod_dirlisting.c index 93cc2794..e513ad50 100644 --- a/src/mod_dirlisting.c +++ b/src/mod_dirlisting.c @@ -1260,7 +1260,7 @@ static void mod_dirlisting_content_type (request_st * const r, const buffer * co if (NULL == encoding) buffer_copy_string_len(vb, CONST_STR_LEN("text/html")); else - buffer_append_str2(vb, CONST_STR_LEN("text/html; charset="), + buffer_append_str2(vb, CONST_STR_LEN("text/html;charset="), BUF_PTR_LEN(encoding)); } diff --git a/src/mod_webdav.c b/src/mod_webdav.c index 51721700..f84b5382 100644 --- a/src/mod_webdav.c +++ b/src/mod_webdav.c @@ -794,7 +794,7 @@ webdav_xml_doctype (buffer * const b, request_st * const r) { http_header_response_set(r, HTTP_HEADER_CONTENT_TYPE, CONST_STR_LEN("Content-Type"), - CONST_STR_LEN("application/xml; charset=\"utf-8\"")); + CONST_STR_LEN("application/xml;charset=utf-8")); buffer_copy_string_len(b, CONST_STR_LEN( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")); @@ -3432,7 +3432,7 @@ webdav_propfind_live_props (const webdav_propfind_bufs * const restrict pb, * in [RFC2616], Section 4.2. Server implementors SHOULD strip * LWS from these values before using as WebDAV property * values. - * e.g. application/xml;charset="utf-8" + * e.g. application/xml;charset=utf-8 * instead of: application/xml; charset="utf-8" * (documentation-only; no check is done here to remove LWS) */ @@ -5598,7 +5598,7 @@ mod_webdav_lock (request_st * const r, const plugin_config * const pconf) * Accept: * / *\r\n * Depth: 0\r\n * Timeout: Second-600\r\n - * Content-Type: text/xml; charset=\"utf-8\"\r\n + * Content-Type: text/xml;charset=utf-8\r\n * Content-Length: 229\r\n * Connection: keep-alive\r\n * Host: 192.168.178.23:1025\r\n |