commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Mattsson" <erik.matts...@imbridge.com>
Subject Re: [HTTPClient] - Http response
Date Fri, 16 May 2003 09:45:34 GMT
Hmmm. the status line ( "HTTP/1.0 420 somtext" ) must be ended
by "\r\n" and then comes the headers, each ends with "\r\n". 
After all headers you must output "\r\n" to tell the client that
there are no more headers coming, and that the body is coming.

if you dont have any headers then the reply looks like
"HTTP/1.0 420 somtext\r\n\r\n"

the client probably hangs because it is waiting for the
headers which are never coming.

//erik


----- Original Message ----- 
From: <theis.meggerle@se.abb.com>
To: <commons-user@jakarta.apache.org>
Sent: Friday, May 16, 2003 10:14 AM
Subject: [HTTPClient] - Http response


> Hi everybody!
> 
> I'm trying to receive a custom status (customer demand). It looks like this
> HTTP/1.0 420 Some text.
> 
> When my response contains two line feeds "\n\n" everything works well, but
> when my response ends with "\r\n" (i.e. HTTP/1.0 420 Some text\r\n) the
> http client hangs.
> 
> Isn't the correct ending \r\n?
> 
> I'm running the alpha2 on windows.
> 
> Thanks in advance,
> 
> /Theis.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org

Mime
View raw message