httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: Build broken
Date Sun, 08 Oct 2000 04:32:49 GMT
On Sat, 7 Oct 2000 09:25:45 -0700 (PDT), rbb@covalent.net wrote:

>> Oh, and here's another good one. I'm getting "client sent HTTP/1.1 request
>> without hostname" even though the client definitely does send an
>> appropriate Host header. Input filtering broken things perhaps?
>
>Both of these are probably broken because of input filtering.  I have not
>seen an issue with Host headers recently, so I'm not sure what's going on
>there.  It sounds like on OS/2, the headers aren't being parsed
>correctly.  ARGH.  I would bet it has something to do with \r\n vs. \n
>from the client.  Does anybody have a method I can use to send just \n
>from a Unix box?

I've found the header reading bug. In getline() it uses 
  e->split(e, length + 1);

The "+ 1" assumes that the LF is followed by a 0 as translated by
http_filter from CR/LF. If the header has LF only this chops the first
character of the next line. Changing it to 
  e->split(e, length + (temp[length] == 0));
works for both cases. I'm not sure if that's the optimal solution though.

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message