www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Lampa <la...@fee.vutbr.cz>
Subject general/160: invoke_handler() doesn't handle mime arguments in content-type
Date Wed, 05 Feb 1997 22:20:02 GMT

>Number:         160
>Category:       general
>Synopsis:       invoke_handler() doesn't handle mime arguments in content-type
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Feb  5 14:20:02 1997
>Originator:     lampa@fee.vutbr.cz
>Organization:
apache
>Release:        1.2b2, b3, b4, b6
>Environment:
FreeBSD-2.2BETA
>Description:
Problem reported for 1.2b2, still unresolved.

The member r->content_type should contain charset specification to
get proper header, but invoke_handler() in http_config.c doesn't parse
content_type arguments and in this case doesn't select proper handler.
Handling should be consistent, if content_type may contain arguments 
(text/html; charset=ISO-8859-2), then invoke_handler() should accept it.
>How-To-Repeat:

>Fix:
Add after this line in invoke_handler():

 char *content_type = r->content_type ? r->content_type : default_type (r);

something like this:

char *p;
if ((p = strchr(r->content_type, ';')) != NULL) {
    while (p > r->content_type && --*p == ' '); /* strip trailing spaces */
    content_type = pstrndup(r->pool, r->content_type, p - r->content_type);
}


%0
>Audit-Trail:
>Unformatted:



Mime
View raw message