Thanks for the fix. I'm not sure what generates that line, but it looks like even the newer servers can generate such specification non-conforming responses. :( Isn't throwing HttpException like this going to prevent people from using HTTP Client to fetch data from lame servers and force them to switch to a more forgiving HTTP library? How about throwing a different exception so that one can differentiate this error or errors of this type from the more generic HttpException?
Just some ideas and questions. Thanks, Otis On Tue, 04 December 2001, "Rodney Waldhoff" wrote: > > >it looks like HTTP Client is super strict and throws HttpException when it > >encounters responses such as these two: > > >200 OK > >Connection: close > >Date: Sat, 01 Dec 2001 23:49:39 GMT > >Server: Apache/1.3.6 (Unix) mod_oas/4.65 > >Content-Type: text/html > >Client-Date: Sat, 01 Dec 2001 23:49:42 GMT > >Client-Response-Num: 1 > >Client-Transfer-Encoding: chunked > > >The HttpException message is: > >"Error in parsing the status line from the response: null" > > > >What is it not getting that it needs? > > > > What's missing is the HTTP-Version part of the response status line. Per > section 6.1 of RFC 2616 (ftp://ftp.isi.edu/in-notes/rfc2616.txt), the status > line should start with "HTTP/1.0" or "HTTP/1.1" (or similiar). > > "6.1 Status-Line > > The first line of a Response message is the Status-Line, consisting > of the protocol version followed by a numeric status code and its > associated textual phrase, with each element separated by SP > characters. [...] > Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF" > > > I've changed the exception message to be more explict (it now reads "unable > to find line starting with "HTTP/"" where it previously said "null"), but I > believe the current behavior is accurate according to the spec. > > What's generating that status line? Are there common servers/services that > violate the spec in this way? > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> _________________________________________________________________ iVillage.com: Solutions for Your Life Check out the most exciting women's community on the Web http://www.ivillage.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
