|Summary:||Truncated Content-Type string "Content-Type: ( with"|
|Product:||Apache httpd-2||Reporter:||Makoto Fujiwara <makoto>|
|Component:||mod_mime_magic||Assignee:||Apache HTTPD Bugs Mailing List <bugs>|
Description Makoto Fujiwara 2005-02-12 00:20:10 UTC
modules/metadata/mod_mime_magic.c has the following line. 2016 if (has_escapes) 2017 magic_rsl_puts(r, " (with escape sequences)"); 2018 return 1; But if this line is processed, the output will be Content-Encoding: (with Say, the string after embedded space is truncated. If I put the hyphen(-) in place of spaces, say 2017 magic_rsl_puts(r, " (with-escape-sequences)"); server outputs entire string. Content-Encoding: (with-escape-sequences) Some request_rec stored by following function may not be processed correctly, 542 static int magic_rsl_add(request_rec *r, char *str)
Comment 1 Makoto Fujiwara 2005-02-12 01:58:04 UTC
Reading following documentation tells me the value may not include 'white space'. So the fix should be on the file modules/metadata/mod_mime_magic.c, right ? 14.17 Content-Type http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html 3.7 Media Types http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 Linear white space (LWS) MUST NOT be used between the type and subtype, nor between an attribute and its value.
Comment 2 Joe Orton 2005-02-25 17:14:24 UTC
It's clearly wrong to generate a Content-Encoding like that. What do you propose, to fix this? Just remove that magic_rsl_puts call completely? Do you have a file on which this path triggers?