> Currently, in org.apache.webdav.lib.WebdavClient.executeMethod(..), the
> following things happen in the following order:
>
> 1. sendRequest(method);
> 2. if(! http11) -> closeOutput
> 3. parseStatusLine(..)
>
> The http11 flag (false by default) is actually set in #3 parseStatusLine,
so
> the first request is always treated as NOT http11. I'm not really sure
why,
> but it seems to prevent being able to connect to servers that require
> authentication?!?
With HTTP/1.0, if you don't specify a content length in the request, you
have to indicate the end of the request using an EOF. The server may very
well not send anything back until it gets that EOF. That's why I'm closing
the output before attempting to parse the status line of the response.
I'm looking for a nicer way to senf the EOF, as it would fail under anything
but JDK 1.3. Any ideas ?
The first request is HTTP/1.0 because it's not safe to assume the server is
HTTP/1.1 compliant without having at least one response from it. Otherwise,
there are some cases where chunked data could be sent to a HTTP/1.0 server.
Also, authentication shouldn't fail because we're closing the output.
Remy