|
From: Gilles D. <gr...@sc...> - 2003-02-14 20:21:59
|
While I was waiting for the other shoe to drop, Frank Passek wrote: > I encountered the following problem with the versions 3.1.6 and 3.2.0.b3. > htdig cannot parse HTTP-header lines when there is no blank after the colon, > as in content-type:text/html > > This problem may be solved by replacing the following lines in > htnet/HtHHTP.cc:633ff > > while (*token && !isspace(*token)) > token++; > > while (*token && isspace(*token)) > token++; > > by > > while (*token && > !isspace(*token) && *token!=':') > token++; > > while (*token && (isspace(*token)||*token==':')) > token++; > > > It worked for me, but I had not time to dive deep into htdig source (had to > get it running for a customer) so please check if this is sufficient. Funny how bug reports seem to come in pairs like this. I just responded two days ago to someone else who had run into this same problem. The odd thing is this code has been the same for years, and just now we get two reports of this previously unreported problem back to back. When Oliver reported the problem, he wasn't even using a particularly new web server (Apache/1.3.27). Anyway, you can see my reply to Oliver here... ftp://ftp.ccsf.org/htdig-patches/3.1.6/Document.cc.0 Same fix, so I think I was on the right track. Thanks for confirming it works. In the case of htdig 3.1.6, this is a case of a misbehaving server, as HTTP/1.0 states that there should be a single space after the colon. However, the htdig 3.2 code implements HTTP/1.1, in which the space (or spaces) after the colon is optional, so in 3.2, it's a client-side bug. Either way, though, it's an easy fix to htdig. For 3.2, the change is made in htnet/HtHTTP.cc rather than htdig/Document.cc. By the way, if you're still using 3.2.0b3, I highly recommend upgrading to a recent 3.2.0b4 snapshot. 3.2.0b3 is VERY buggy. -- Gilles R. Detillieux E-mail: <gr...@sc...> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) |