httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@ooo.lanl.gov>
Subject Re: 0.6.2 must go
Date Thu, 11 May 1995 11:59:46 GMT
 
> I suggest that instead of playing around with pointers, you either rewrite
> the header (with memmove or similar), _or_ split up the header into
> name/value once and for all, and get rid of the hack of inserting and removing
> '\0' from the header string.
> 
>  David.


The bug only appears when a script supplies a Content-type of its
own. This happened because of a change from using "scanf" to read
the content-type - presumably to allow parameters in patch B19.

Therefore, we only need to fix the section which saves the content-type
so that it doesn't save a leading space.

Any objection to the following patch...


*** http_mime.c.orig    Thu May  4 14:40:09 1995
--- http_mime.c Thu May 11 11:54:40 1995
***************
*** 338,343 ****
--- 338,344 ----
            char *endp = l + strlen(l) - 1;
            while (endp > l && isspace(*endp)) *endp-- = '\0';

+             while (*l == ' ') l++;
            strcpy (content_type, l);
        }
          else if(!strcasecmp(w,"Location"))





--
Rob Hartill                           
http://nqcd.lanl.gov/~hartill/

Mime
View raw message