> 
> That patch won't work except if you're talking to an HTTP/1.1 server.
> An HTTP/1.0 server will wait until you close half of the connection before
> sending a response, at least in that particular case.
> 
> I think it's always a good idea to start with an OPTIONS /.
> 

i have the same problem with the OPTIONS method.  i don't know why, but
when the output on the socket is shutdown, it seems that the input
stream is closed too.  so, the status line cannot be parsed, and an
exception is thrown:

test:
     [java] Main.main()
     [java] using url http://homer:7777
     [java] Start session : Host:homer Port:7777 HTTPS:false
     [java] Reopen connection : Host:homer Port:7777
     [java] 
     [java] OPTIONS / HTTP/1.1
     [java] Content-Length: 0
     [java] Host: homer:7777
     [java] User-Agent: Jakarta HTTP Client/1.0
     [java] 
     [java] closing output...
     [java] Closing connection
     [java] Reopen connection : Host:homer Port:7777
     [java] 
     [java] OPTIONS / HTTP/1.1
     [java] Content-Length: 0
     [java] Host: homer:7777
     [java] java.io.IOException: Couldn't parse status line
     [java]     at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:451)
     [java]     at Main.main(Main.java:54)
     [java] User-Agent: Jakarta HTTP Client/1.0
     [java] 
     [java] closing output...
         [java] java.io.IOException: Couldn't parse status line
     [java]     at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:451)
     [java]     at Main.main(Main.java:54)
 [java] Closing connection
     [java] java.io.IOException: Couldn't parse status line
     [java] Reopen connection : Host:homer Port:7777
     [java] 

...

i don't have this problem when tomcat is the webserver or when iis 5 is
the web server, only when apache is...

Reply via email to