Lee Francis Wilhelmsen wrote:
- The server responds saying not authorized with a realm value
- HTTP Client then resends the post using the credentitals
  I have supplied (why doesn't it do this the first time?)

This is the standard behaviour. You can enable preemtive authentication.


org.apache.commons.httpclient.HttpRecoverableException: Error in parsing the status line from the response: unable to find line starting with "HTTP"


DEBUG [main] httpclient.wire - << "HTTP/1.1 401 Unauthorized [\r][\n]"
DEBUG [main] httpclient.wire - << "Server: IBM HTTP Server/V5R3M0[\r][\n]"
DEBUG [main] httpclient.wire - << "Date: Fri, 14 May 2004 11:18:33 GMT[\r][\n]"
DEBUG [main] httpclient.wire - << "Accept-Ranges: bytes[\r][\n]"
DEBUG [main] httpclient.wire - << "Content-Type: text/html; charset=IBM-1047[\r][\n]"
DEBUG [main] httpclient.wire - << "Content-Length: 282[\r][\n]"
DEBUG [main] httpclient.wire - << "Last-Modified: Fri, 14 May 2004 11:18:33 GMT[\r][\n]"
DEBUG [main] httpclient.wire - << "Expires: Fri, 14 May 2004 11:18:33 GMT[\r][\n]"
DEBUG [main] httpclient.wire - << "Pragma: no-cache[\r][\n]"
DEBUG [main] httpclient.wire - << "Cache-Control: no-cache[\r][\n]"
DEBUG [main] httpclient.wire - << "WWW-Authenticate: Basic realm="STING_Restricted"[\r][\n]"
DEBUG [main] httpclient.wire - << "IMW0254E <HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY bgcolor="[0xfffd][0xfffd]FFF7E7"><H1>Error 401</H1>IMW0216E Not authorized. Authentication failed.<P><HR><ADDRESS><A HREF="https://e-torg.no.ihost.com/"; target="_top">IBM HTTP Server - North American Edition V5R3M0</A></ADDRESS></BODY></HTML"
DEBUG [main] httpclient.wire - >> "POST /sting/StingServlet


Notice there is no closing ">" character and this seems to be the cause of this particular problem.

Why is this happening? Can anyone help?

Best regards
Lee Francis Wilhelmsen


Lee,

The problem is that your server reports an incorrect Content-Length on the 401 Response body.
Count yourself: It sais 282 bytes. But the response is 283 bytes. (the two [0xfffd] sequences are one byte each). Nothing we can do here I fear.


Ortwin Glück

--
 _________________________________________________________________
 NOSE applied intelligence ag

 ortwin glück                      [www]      http://www.nose.ch
 software engineer                 [email] [EMAIL PROTECTED]
 hardturmstrasse 171               [pgp id]           0x81CF3416
 8005 zürich                       [office]      +41-1-277 57 35
 switzerland                       [fax]         +41-1-277 57 12

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to