You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by "Boxer, Aaron" <Aa...@uhn.ca> on 2013/12/16 21:20:42 UTC

connection closed on first attempt to send to IIS WebDav server

Hello,
I am using the sardine java WebDav client (which uses HTTPClient) to send files using WebDav protocol to an IIS 7.5 server.
Authentication is Basic.

I always get the connection closed with a socket connection on my *first* put to the server;  any subsequent puts are fine.

Below is a debug trace for sending two files.

Thanks!
Aaron

////////////////////////////////////////////////////////////////////////////////////////////////

2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
2013/12/16 15:20:11:971 EST [DEBUG] DefaultClientConnectionOperator - Connecting to scaramouche:80
2013/12/16 15:20:11:972 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
2013/12/16 15:20:11:972 EST [DEBUG] RequestAuthCache - Auth cache not set in the context
2013/12/16 15:20:11:972 EST [DEBUG] RequestTargetAuthentication - Target auth state: UNCHALLENGED
2013/12/16 15:20:11:972 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
2013/12/16 15:20:11:972 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
2013/12/16 15:20:11:972 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
2013/12/16 15:20:11:972 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Expect: 100-continue
2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Transfer-Encoding: chunked
2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Host: scaramouche:80
2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Connection: Keep-Alive
2013/12/16 15:20:11:972 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
2013/12/16 15:20:11:974 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 401 Unauthorized
2013/12/16 15:20:11:975 EST [DEBUG] headers - << HTTP/1.1 401 Unauthorized
2013/12/16 15:20:11:975 EST [DEBUG] headers - << Cache-Control: private
2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Type: text/html; charset=utf-8
2013/12/16 15:20:11:975 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
2013/12/16 15:20:11:975 EST [DEBUG] headers - << WWW-Authenticate: Basic realm="scaramouche"
2013/12/16 15:20:11:975 EST [DEBUG] headers - << X-Powered-By: ASP.NET
2013/12/16 15:20:11:975 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Length: 6321
2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Authentication required
2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - scaramouche:80 requested authentication
2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Authentication schemes in the order of preference: [negotiate, Kerberos, NTLM, Digest, Basic]
2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for negotiate authentication scheme not available
2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Selected authentication options: [BASIC]
2013/12/16 15:20:11:975 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
2013/12/16 15:20:11:975 EST [DEBUG] RequestAuthCache - Auth cache not set in the context
2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - Generating response to an authentication challenge using basic scheme
2013/12/16 15:20:11:976 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
2013/12/16 15:20:11:976 EST [DEBUG] DefaultHttpClient - Attempt 2 to execute request
2013/12/16 15:20:11:976 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
2013/12/16 15:20:11:976 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Expect: 100-continue
2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Transfer-Encoding: chunked
2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Host: scaramouche:80
2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Connection: Keep-Alive
2013/12/16 15:20:11:976 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - Connection 0.0.0.0:55055<->10.7.11.181:80 closed
2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Closing the connection.
2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - Connection 0.0.0.0:55055<->10.7.11.181:80 closed
2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - I/O exception (java.net.SocketException) caught when processing request: Connection reset
2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Connection reset <java.net.SocketException: Connection reset>java.net.SocketException: Connection reset
       at java.net.SocketInputStream.read(SocketInputStream.java:196)
       at java.net.SocketInputStream.read(SocketInputStream.java:122)
       at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
       at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
       at org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:95)
       at org.apache.http.impl.AbstractHttpClientConnection.isResponseAvailable(AbstractHttpClientConnection.java:244)
       at org.apache.http.impl.conn.ManagedClientConnectionImpl.isResponseAvailable(ManagedClientConnectionImpl.java:186)
       at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:217)
       at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
       at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
       at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
       at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
       at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
       at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:214)
       at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)
       at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:807)
       at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:739)
       at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:722)
       at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:710)
       at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:680)
       at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:673)
       at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:666)
       at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:660)
       at wjhk.jupload2.upload.FileUploadThreadWebDAV.beforeFile(FileUploadThreadWebDAV.java:157)
       at wjhk.jupload2.upload.DefaultFileUploadThread.doNonChunkedUpload(DefaultFileUploadThread.java:694)
       at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:527)
       at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:336)

2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - Retrying request
2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Reopening the direct connection.
2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnectionOperator - Connecting to scaramouche:80
2013/12/16 15:20:11:979 EST [DEBUG] DefaultHttpClient - Attempt 3 to execute request
2013/12/16 15:20:11:979 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
2013/12/16 15:20:11:979 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Expect: 100-continue
2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Transfer-Encoding: chunked
2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Host: scaramouche:80
2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Connection: Keep-Alive
2013/12/16 15:20:11:979 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
2013/12/16 15:20:11:980 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
2013/12/16 15:20:11:980 EST [DEBUG] headers - << HTTP/1.1 100 Continue
2013/12/16 15:20:12:118 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
2013/12/16 15:20:12:118 EST [DEBUG] headers - << HTTP/1.1 201 Created
2013/12/16 15:20:12:118 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
2013/12/16 15:20:12:118 EST [DEBUG] headers - << X-Powered-By: ASP.NET
2013/12/16 15:20:12:118 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
2013/12/16 15:20:12:118 EST [DEBUG] headers - << Content-Length: 0
2013/12/16 15:20:12:118 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Authentication succeeded
2013/12/16 15:20:12:119 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Stale connection check
2013/12/16 15:20:12:120 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
2013/12/16 15:20:12:120 EST [DEBUG] RequestAuthCache - Re-using cached 'basic' auth scheme for http://scaramouche:80
2013/12/16 15:20:12:120 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
2013/12/16 15:20:12:120 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
2013/12/16 15:20:12:120 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
2013/12/16 15:20:12:120 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
2013/12/16 15:20:12:120 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Expect: 100-continue
2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Transfer-Encoding: chunked
2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Host: scaramouche:80
2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Connection: Keep-Alive
2013/12/16 15:20:12:120 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
2013/12/16 15:20:12:121 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
2013/12/16 15:20:12:121 EST [DEBUG] headers - << HTTP/1.1 100 Continue
2013/12/16 15:20:12:168 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
2013/12/16 15:20:12:168 EST [DEBUG] headers - << HTTP/1.1 201 Created
2013/12/16 15:20:12:168 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
2013/12/16 15:20:12:168 EST [DEBUG] headers - << X-Powered-By: ASP.NET
2013/12/16 15:20:12:168 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
2013/12/16 15:20:12:168 EST [DEBUG] headers - << Content-Length: 0
2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Authentication succeeded
2013/12/16 15:20:12:168 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
2013/12/16 15:20:12:169 EST [DEBUG] DefaultHttpClient - Stale connection check
2013/12/16 15:20:12:170 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
2013/12/16 15:20:12:170 EST [DEBUG] RequestAuthCache - Re-using cached 'basic' auth scheme for http://scaramouche:80
2013/12/16 15:20:12:170 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
2013/12/16 15:20:12:170 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
2013/12/16 15:20:12:170 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info HTTP/1.1
2013/12/16 15:20:12:170 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info HTTP/1.1
2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Expect: 100-continue
2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Transfer-Encoding: chunked
2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Host: scaramouche:80
2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Connection: Keep-Alive
2013/12/16 15:20:12:170 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 100 Continue
2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 201 Created
2013/12/16 15:20:12:170 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
2013/12/16 15:20:12:171 EST [DEBUG] headers - << X-Powered-By: ASP.NET
2013/12/16 15:20:12:171 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
2013/12/16 15:20:12:171 EST [DEBUG] headers - << Content-Length: 0
2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Authentication succeeded
2013/12/16 15:20:12:171 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]







This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete all copies. 
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.

RE: connection closed on first attempt to send to IIS WebDav server

Posted by "Boxer, Aaron" <Aa...@uhn.ca>.
________________________________________
From: Oleg Kalnichevski [olegk@apache.org]
Sent: Tuesday, December 17, 2013 3:27 AM
To: HttpClient User Discussion
Subject: Re: connection closed on first attempt to send to IIS WebDav server

On Tue, 2013-12-17 at 03:41 +0000, Boxer, Aaron wrote:
> Oleg,
>
> I managed to make the error go away by using "pre-emptive authentication" on the client:
>
> " When enabling preemptive authentication using Sardine.enablePreemptiveAuthentication(String host), sending an authentication header before any challenge received by the server."
>
> Thanks so much for your help,
> Aaron
>

Aaron

I still think the culprit is Microsoft-IIS/7.5. It rejects the first
request as unauthenticated, which is fine, but it also closes the
connection without properly informing the client (by sending a HTTP/1.1
message without 'Connection: close' header).

Preemptive authentication helps work the problem around.



Yes, I think you're right.  Sadly, IT insists on  using IIS, so I am stuck with this behaviour.
The workaround doesn't add too much overhead, so I guess I will use it.

Thanks again,
Aaron




This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete all copies. 
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: connection closed on first attempt to send to IIS WebDav server

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2013-12-17 at 03:41 +0000, Boxer, Aaron wrote:
> Oleg,
> 
> I managed to make the error go away by using "pre-emptive authentication" on the client:
> 
> " When enabling preemptive authentication using Sardine.enablePreemptiveAuthentication(String host), sending an authentication header before any challenge received by the server."
> 
> Thanks so much for your help,
> Aaron
> 

Aaron

I still think the culprit is Microsoft-IIS/7.5. It rejects the first
request as unauthenticated, which is fine, but it also closes the
connection without properly informing the client (by sending a HTTP/1.1
message without 'Connection: close' header).

Preemptive authentication helps work the problem around.

Oleg 

> 
> 
> -----Original Message-----
> From: Boxer, Aaron 
> Sent: Monday, December 16, 2013 10:26 PM
> To: HttpClient User Discussion
> Subject: RE: connection closed on first attempt to send to IIS WebDav server
> 
> Hi Oleg,
> .....
> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org]
> Sent: Monday, December 16, 2013 5:01 PM
> To: HttpClient User Discussion
> Subject: Re: connection closed on first attempt to send to IIS WebDav server
> 
> On Mon, 2013-12-16 at 20:20 +0000, Boxer, Aaron wrote:
> > Hello,
> > I am using the sardine java WebDav client (which uses HTTPClient) to send files using WebDav protocol to an IIS 7.5 server.
> > Authentication is Basic.
> > 
> > I always get the connection closed with a socket connection on my *first* put to the server;  any subsequent puts are fine.
> > 
> > Below is a debug trace for sending two files.
> > 
> > Thanks!
> > Aaron
> > 
> 
> Looks really like a server side issue. 
> 
> Can you tell me what version of HttpClient is being used?
> 
> 
> Thanks, I am using the latest version of httpclient -  4.3.2-SNAPSHOT
> 
> By the way, below are the logs from the web server; it seems that the first two requests (with 401.2 responses) don't have a user name in the request.  
> 
> #Software: Microsoft Internet Information Services 7.5
> #Version: 1.0
> #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
> 2013-12-16 20:12:48 10.7.11.181 HEAD /upload - 80 - 10.7.11.181 - 401 2 5 82
> 2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.1 - 80 - 10.7.11.181 Sardine/UNAVAILABLE 401 2 5 0
> 2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.1 - 80 jdmi 10.7.11.181 Sardine/UNAVAILABLE 201 0 0 177
> 2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.2 - 80 jdmi 10.7.11.181 Sardine/UNAVAILABLE 201 0 0 67
> 
> 
> 
> 
> > //////////////////////////////////////////////////////////////////////
> > //////////////////////////
> > 
> > 2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection request: [route: {}->http://scaramouche:80][total kept 
> > alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
> > 2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection leased: [id: 2][route: {}->http://scaramouche:80][total 
> > kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> > 2013/12/16 15:20:11:971 EST [DEBUG] DefaultClientConnectionOperator - 
> > Connecting to scaramouche:80
> > 2013/12/16 15:20:11:972 EST [DEBUG] RequestAddCookies - CookieSpec 
> > selected: best-match
> > 2013/12/16 15:20:11:972 EST [DEBUG] RequestAuthCache - Auth cache not 
> > set in the context
> > 2013/12/16 15:20:11:972 EST [DEBUG] RequestTargetAuthentication - 
> > Target auth state: UNCHALLENGED
> > 2013/12/16 15:20:11:972 EST [DEBUG] RequestProxyAuthentication - Proxy 
> > auth state: UNCHALLENGED
> > 2013/12/16 15:20:11:972 EST [DEBUG] DefaultHttpClient - Attempt 1 to 
> > execute request
> > 2013/12/16 15:20:11:972 EST [DEBUG] DefaultClientConnection - Sending 
> > request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> > 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> PUT 
> > /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> > 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Expect: 100-continue
> > 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Content-Type: 
> > ISO-8859-1
> > 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Transfer-Encoding: 
> > chunked
> > 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Host: scaramouche:80
> > 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Connection: 
> > Keep-Alive
> > 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> User-Agent: 
> > Sardine/UNAVAILABLE
> > 2013/12/16 15:20:11:974 EST [DEBUG] DefaultClientConnection - 
> > Receiving response: HTTP/1.1 401 Unauthorized
> > 2013/12/16 15:20:11:975 EST [DEBUG] headers - << HTTP/1.1 401 
> > Unauthorized
> > 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Cache-Control: 
> > private
> > 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Type: 
> > text/html; charset=utf-8
> > 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Server: 
> > Microsoft-IIS/7.5
> > 2013/12/16 15:20:11:975 EST [DEBUG] headers - << WWW-Authenticate: Basic realm="scaramouche"
> > 2013/12/16 15:20:11:975 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> > 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Date: Mon, 16 Dec 
> > 2013 20:20:11 GMT
> > 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Length: 6321
> > 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Connection can 
> > be kept alive indefinitely
> > 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Authentication 
> > required
> > 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - scaramouche:80 
> > requested authentication
> > 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> > Authentication schemes in the order of preference: [negotiate, 
> > Kerberos, NTLM, Digest, Basic]
> > 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> > Challenge for negotiate authentication scheme not available
> > 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> > Challenge for Kerberos authentication scheme not available
> > 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> > Challenge for NTLM authentication scheme not available
> > 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> > Challenge for Digest authentication scheme not available
> > 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Selected 
> > authentication options: [BASIC]
> > 2013/12/16 15:20:11:975 EST [DEBUG] RequestAddCookies - CookieSpec 
> > selected: best-match
> > 2013/12/16 15:20:11:975 EST [DEBUG] RequestAuthCache - Auth cache not 
> > set in the context
> > 2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - 
> > Target auth state: CHALLENGED
> > 2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - 
> > Generating response to an authentication challenge using basic scheme
> > 2013/12/16 15:20:11:976 EST [DEBUG] RequestProxyAuthentication - Proxy 
> > auth state: UNCHALLENGED
> > 2013/12/16 15:20:11:976 EST [DEBUG] DefaultHttpClient - Attempt 2 to 
> > execute request
> > 2013/12/16 15:20:11:976 EST [DEBUG] DefaultClientConnection - Sending 
> > request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> > 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> PUT 
> > /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> > 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Expect: 100-continue
> > 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Content-Type: 
> > ISO-8859-1
> > 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Transfer-Encoding: 
> > chunked
> > 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Host: scaramouche:80
> > 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Connection: 
> > Keep-Alive
> > 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> User-Agent: 
> > Sardine/UNAVAILABLE
> > 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Authorization: Basic 
> > amRtaTpCYW5hbmExMSEhAAAAAAAA
> > 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - 
> > Connection 0.0.0.0:55055<->10.7.11.181:80 closed
> > 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Closing the connection.
> > 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - 
> > Connection 0.0.0.0:55055<->10.7.11.181:80 closed
> > 2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - I/O exception 
> > (java.net.SocketException) caught when processing request: Connection 
> > reset
> > 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Connection reset <java.net.SocketException: Connection reset>java.net.SocketException: Connection reset
> >        at java.net.SocketInputStream.read(SocketInputStream.java:196)
> >        at java.net.SocketInputStream.read(SocketInputStream.java:122)
> >        at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
> >        at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
> >        at org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:95)
> >        at org.apache.http.impl.AbstractHttpClientConnection.isResponseAvailable(AbstractHttpClientConnection.java:244)
> >        at org.apache.http.impl.conn.ManagedClientConnectionImpl.isResponseAvailable(ManagedClientConnectionImpl.java:186)
> >        at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:217)
> >        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
> >        at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
> >        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
> >        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
> >        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
> >        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:214)
> >        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)
> >        at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:807)
> >        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:739)
> >        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:722)
> >        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:710)
> >        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:680)
> >        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:673)
> >        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:666)
> >        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:660)
> >        at wjhk.jupload2.upload.FileUploadThreadWebDAV.beforeFile(FileUploadThreadWebDAV.java:157)
> >        at wjhk.jupload2.upload.DefaultFileUploadThread.doNonChunkedUpload(DefaultFileUploadThread.java:694)
> >        at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:527)
> >        at 
> > wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThre
> > ad.java:336)
> > 
> > 2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - Retrying 
> > request
> > 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Reopening the direct connection.
> > 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnectionOperator - 
> > Connecting to scaramouche:80
> > 2013/12/16 15:20:11:979 EST [DEBUG] DefaultHttpClient - Attempt 3 to 
> > execute request
> > 2013/12/16 15:20:11:979 EST [DEBUG] DefaultClientConnection - Sending 
> > request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> > 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> PUT 
> > /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> > 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Expect: 100-continue
> > 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Content-Type: 
> > ISO-8859-1
> > 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Transfer-Encoding: 
> > chunked
> > 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Host: scaramouche:80
> > 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Connection: 
> > Keep-Alive
> > 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> User-Agent: 
> > Sardine/UNAVAILABLE
> > 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Authorization: Basic 
> > amRtaTpCYW5hbmExMSEhAAAAAAAA
> > 2013/12/16 15:20:11:980 EST [DEBUG] DefaultClientConnection - 
> > Receiving response: HTTP/1.1 100 Continue
> > 2013/12/16 15:20:11:980 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> > 2013/12/16 15:20:12:118 EST [DEBUG] DefaultClientConnection - 
> > Receiving response: HTTP/1.1 201 Created
> > 2013/12/16 15:20:12:118 EST [DEBUG] headers - << HTTP/1.1 201 Created
> > 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Server: 
> > Microsoft-IIS/7.5
> > 2013/12/16 15:20:12:118 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> > 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Date: Mon, 16 Dec 
> > 2013 20:20:11 GMT
> > 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Content-Length: 0
> > 2013/12/16 15:20:12:118 EST [DEBUG] DefaultHttpClient - Connection can 
> > be kept alive indefinitely
> > 2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Authentication 
> > succeeded
> > 2013/12/16 15:20:12:119 EST [DEBUG] TargetAuthenticationStrategy - 
> > Caching 'basic' auth scheme for http://scaramouche:80
> > 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive 
> > indefinitely
> > 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection released: [id: 2][route: {}->http://scaramouche:80][total 
> > kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> > 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection request: [route: {}->http://scaramouche:80][total kept 
> > alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> > 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection leased: [id: 2][route: {}->http://scaramouche:80][total 
> > kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> > 2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Stale 
> > connection check
> > 2013/12/16 15:20:12:120 EST [DEBUG] RequestAddCookies - CookieSpec 
> > selected: best-match
> > 2013/12/16 15:20:12:120 EST [DEBUG] RequestAuthCache - Re-using cached 
> > 'basic' auth scheme for http://scaramouche:80
> > 2013/12/16 15:20:12:120 EST [DEBUG] RequestTargetAuthentication - 
> > Target auth state: CHALLENGED
> > 2013/12/16 15:20:12:120 EST [DEBUG] RequestProxyAuthentication - Proxy 
> > auth state: UNCHALLENGED
> > 2013/12/16 15:20:12:120 EST [DEBUG] DefaultHttpClient - Attempt 1 to 
> > execute request
> > 2013/12/16 15:20:12:120 EST [DEBUG] DefaultClientConnection - Sending 
> > request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
> > 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> PUT 
> > /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
> > 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Expect: 100-continue
> > 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Content-Type: 
> > ISO-8859-1
> > 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Transfer-Encoding: 
> > chunked
> > 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Host: scaramouche:80
> > 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Connection: 
> > Keep-Alive
> > 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> User-Agent: 
> > Sardine/UNAVAILABLE
> > 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Authorization: Basic 
> > amRtaTpCYW5hbmExMSEhAAAAAAAA
> > 2013/12/16 15:20:12:121 EST [DEBUG] DefaultClientConnection - 
> > Receiving response: HTTP/1.1 100 Continue
> > 2013/12/16 15:20:12:121 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> > 2013/12/16 15:20:12:168 EST [DEBUG] DefaultClientConnection - 
> > Receiving response: HTTP/1.1 201 Created
> > 2013/12/16 15:20:12:168 EST [DEBUG] headers - << HTTP/1.1 201 Created
> > 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Server: 
> > Microsoft-IIS/7.5
> > 2013/12/16 15:20:12:168 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> > 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Date: Mon, 16 Dec 
> > 2013 20:20:11 GMT
> > 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Content-Length: 0
> > 2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Connection can 
> > be kept alive indefinitely
> > 2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Authentication 
> > succeeded
> > 2013/12/16 15:20:12:168 EST [DEBUG] TargetAuthenticationStrategy - 
> > Caching 'basic' auth scheme for http://scaramouche:80
> > 2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive 
> > indefinitely
> > 2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection released: [id: 2][route: {}->http://scaramouche:80][total 
> > kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> > 2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection request: [route: {}->http://scaramouche:80][total kept 
> > alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> > 2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection leased: [id: 2][route: {}->http://scaramouche:80][total 
> > kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> > 2013/12/16 15:20:12:169 EST [DEBUG] DefaultHttpClient - Stale 
> > connection check
> > 2013/12/16 15:20:12:170 EST [DEBUG] RequestAddCookies - CookieSpec 
> > selected: best-match
> > 2013/12/16 15:20:12:170 EST [DEBUG] RequestAuthCache - Re-using cached 
> > 'basic' auth scheme for http://scaramouche:80
> > 2013/12/16 15:20:12:170 EST [DEBUG] RequestTargetAuthentication - 
> > Target auth state: CHALLENGED
> > 2013/12/16 15:20:12:170 EST [DEBUG] RequestProxyAuthentication - Proxy 
> > auth state: UNCHALLENGED
> > 2013/12/16 15:20:12:170 EST [DEBUG] DefaultHttpClient - Attempt 1 to 
> > execute request
> > 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Sending 
> > request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info 
> > HTTP/1.1
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> PUT 
> > /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info HTTP/1.1
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Expect: 100-continue
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Content-Type: 
> > ISO-8859-1
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Transfer-Encoding: 
> > chunked
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Host: scaramouche:80
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Connection: 
> > Keep-Alive
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> User-Agent: 
> > Sardine/UNAVAILABLE
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Authorization: Basic 
> > amRtaTpCYW5hbmExMSEhAAAAAAAA
> > 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - 
> > Receiving response: HTTP/1.1 100 Continue
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> > 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - 
> > Receiving response: HTTP/1.1 201 Created
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 201 Created
> > 2013/12/16 15:20:12:170 EST [DEBUG] headers - << Server: 
> > Microsoft-IIS/7.5
> > 2013/12/16 15:20:12:171 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> > 2013/12/16 15:20:12:171 EST [DEBUG] headers - << Date: Mon, 16 Dec 
> > 2013 20:20:11 GMT
> > 2013/12/16 15:20:12:171 EST [DEBUG] headers - << Content-Length: 0
> > 2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Connection can 
> > be kept alive indefinitely
> > 2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Authentication 
> > succeeded
> > 2013/12/16 15:20:12:171 EST [DEBUG] TargetAuthenticationStrategy - 
> > Caching 'basic' auth scheme for http://scaramouche:80
> > 2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive 
> > indefinitely
> > 2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - 
> > Connection released: [id: 2][route: {}->http://scaramouche:80][total 
> > kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
> > Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
> > If you have received this e-mail in error, please contact the sender and delete all copies. 
> > Opinions, conclusions or other information contained in this e-mail may not be that of the organization.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
> Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
> If you have received this e-mail in error, please contact the sender and delete all copies. 
> Opinions, conclusions or other information contained in this e-mail may not be that of the organization.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
> Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
> If you have received this e-mail in error, please contact the sender and delete all copies. 
> Opinions, conclusions or other information contained in this e-mail may not be that of the organization.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


RE: connection closed on first attempt to send to IIS WebDav server

Posted by "Boxer, Aaron" <Aa...@uhn.ca>.
Oleg,

I managed to make the error go away by using "pre-emptive authentication" on the client:

" When enabling preemptive authentication using Sardine.enablePreemptiveAuthentication(String host), sending an authentication header before any challenge received by the server."

Thanks so much for your help,
Aaron



-----Original Message-----
From: Boxer, Aaron 
Sent: Monday, December 16, 2013 10:26 PM
To: HttpClient User Discussion
Subject: RE: connection closed on first attempt to send to IIS WebDav server

Hi Oleg,
.....

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org]
Sent: Monday, December 16, 2013 5:01 PM
To: HttpClient User Discussion
Subject: Re: connection closed on first attempt to send to IIS WebDav server

On Mon, 2013-12-16 at 20:20 +0000, Boxer, Aaron wrote:
> Hello,
> I am using the sardine java WebDav client (which uses HTTPClient) to send files using WebDav protocol to an IIS 7.5 server.
> Authentication is Basic.
> 
> I always get the connection closed with a socket connection on my *first* put to the server;  any subsequent puts are fine.
> 
> Below is a debug trace for sending two files.
> 
> Thanks!
> Aaron
> 

Looks really like a server side issue. 

Can you tell me what version of HttpClient is being used?


Thanks, I am using the latest version of httpclient -  4.3.2-SNAPSHOT

By the way, below are the logs from the web server; it seems that the first two requests (with 401.2 responses) don't have a user name in the request.  

#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2013-12-16 20:12:48 10.7.11.181 HEAD /upload - 80 - 10.7.11.181 - 401 2 5 82
2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.1 - 80 - 10.7.11.181 Sardine/UNAVAILABLE 401 2 5 0
2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.1 - 80 jdmi 10.7.11.181 Sardine/UNAVAILABLE 201 0 0 177
2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.2 - 80 jdmi 10.7.11.181 Sardine/UNAVAILABLE 201 0 0 67




> //////////////////////////////////////////////////////////////////////
> //////////////////////////
> 
> 2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - 
> Connection request: [route: {}->http://scaramouche:80][total kept 
> alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
> 2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - 
> Connection leased: [id: 2][route: {}->http://scaramouche:80][total 
> kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:11:971 EST [DEBUG] DefaultClientConnectionOperator - 
> Connecting to scaramouche:80
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestAddCookies - CookieSpec 
> selected: best-match
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestAuthCache - Auth cache not 
> set in the context
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestTargetAuthentication - 
> Target auth state: UNCHALLENGED
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestProxyAuthentication - Proxy 
> auth state: UNCHALLENGED
> 2013/12/16 15:20:11:972 EST [DEBUG] DefaultHttpClient - Attempt 1 to 
> execute request
> 2013/12/16 15:20:11:972 EST [DEBUG] DefaultClientConnection - Sending 
> request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> PUT 
> /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Content-Type: 
> ISO-8859-1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Transfer-Encoding: 
> chunked
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Connection: 
> Keep-Alive
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> User-Agent: 
> Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:974 EST [DEBUG] DefaultClientConnection - 
> Receiving response: HTTP/1.1 401 Unauthorized
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << HTTP/1.1 401 
> Unauthorized
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Cache-Control: 
> private
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Type: 
> text/html; charset=utf-8
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Server: 
> Microsoft-IIS/7.5
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << WWW-Authenticate: Basic realm="scaramouche"
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Date: Mon, 16 Dec 
> 2013 20:20:11 GMT
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Length: 6321
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Connection can 
> be kept alive indefinitely
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Authentication 
> required
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - scaramouche:80 
> requested authentication
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> Authentication schemes in the order of preference: [negotiate, 
> Kerberos, NTLM, Digest, Basic]
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> Challenge for negotiate authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> Challenge for Kerberos authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> Challenge for NTLM authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - 
> Challenge for Digest authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Selected 
> authentication options: [BASIC]
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestAddCookies - CookieSpec 
> selected: best-match
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestAuthCache - Auth cache not 
> set in the context
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - 
> Target auth state: CHALLENGED
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - 
> Generating response to an authentication challenge using basic scheme
> 2013/12/16 15:20:11:976 EST [DEBUG] RequestProxyAuthentication - Proxy 
> auth state: UNCHALLENGED
> 2013/12/16 15:20:11:976 EST [DEBUG] DefaultHttpClient - Attempt 2 to 
> execute request
> 2013/12/16 15:20:11:976 EST [DEBUG] DefaultClientConnection - Sending 
> request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> PUT 
> /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Content-Type: 
> ISO-8859-1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Transfer-Encoding: 
> chunked
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Connection: 
> Keep-Alive
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> User-Agent: 
> Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Authorization: Basic 
> amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - 
> Connection 0.0.0.0:55055<->10.7.11.181:80 closed
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Closing the connection.
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - 
> Connection 0.0.0.0:55055<->10.7.11.181:80 closed
> 2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - I/O exception 
> (java.net.SocketException) caught when processing request: Connection 
> reset
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Connection reset <java.net.SocketException: Connection reset>java.net.SocketException: Connection reset
>        at java.net.SocketInputStream.read(SocketInputStream.java:196)
>        at java.net.SocketInputStream.read(SocketInputStream.java:122)
>        at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
>        at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
>        at org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:95)
>        at org.apache.http.impl.AbstractHttpClientConnection.isResponseAvailable(AbstractHttpClientConnection.java:244)
>        at org.apache.http.impl.conn.ManagedClientConnectionImpl.isResponseAvailable(ManagedClientConnectionImpl.java:186)
>        at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:217)
>        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
>        at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
>        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
>        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:214)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)
>        at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:807)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:739)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:722)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:710)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:680)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:673)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:666)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:660)
>        at wjhk.jupload2.upload.FileUploadThreadWebDAV.beforeFile(FileUploadThreadWebDAV.java:157)
>        at wjhk.jupload2.upload.DefaultFileUploadThread.doNonChunkedUpload(DefaultFileUploadThread.java:694)
>        at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:527)
>        at 
> wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThre
> ad.java:336)
> 
> 2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - Retrying 
> request
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Reopening the direct connection.
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnectionOperator - 
> Connecting to scaramouche:80
> 2013/12/16 15:20:11:979 EST [DEBUG] DefaultHttpClient - Attempt 3 to 
> execute request
> 2013/12/16 15:20:11:979 EST [DEBUG] DefaultClientConnection - Sending 
> request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> PUT 
> /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Content-Type: 
> ISO-8859-1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Transfer-Encoding: 
> chunked
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Connection: 
> Keep-Alive
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> User-Agent: 
> Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Authorization: Basic 
> amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:11:980 EST [DEBUG] DefaultClientConnection - 
> Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:11:980 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:118 EST [DEBUG] DefaultClientConnection - 
> Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Server: 
> Microsoft-IIS/7.5
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Date: Mon, 16 Dec 
> 2013 20:20:11 GMT
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:118 EST [DEBUG] DefaultHttpClient - Connection can 
> be kept alive indefinitely
> 2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Authentication 
> succeeded
> 2013/12/16 15:20:12:119 EST [DEBUG] TargetAuthenticationStrategy - 
> Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - 
> Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive 
> indefinitely
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - 
> Connection released: [id: 2][route: {}->http://scaramouche:80][total 
> kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - 
> Connection request: [route: {}->http://scaramouche:80][total kept 
> alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - 
> Connection leased: [id: 2][route: {}->http://scaramouche:80][total 
> kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Stale 
> connection check
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestAddCookies - CookieSpec 
> selected: best-match
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestAuthCache - Re-using cached 
> 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestTargetAuthentication - 
> Target auth state: CHALLENGED
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestProxyAuthentication - Proxy 
> auth state: UNCHALLENGED
> 2013/12/16 15:20:12:120 EST [DEBUG] DefaultHttpClient - Attempt 1 to 
> execute request
> 2013/12/16 15:20:12:120 EST [DEBUG] DefaultClientConnection - Sending 
> request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> PUT 
> /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Content-Type: 
> ISO-8859-1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Transfer-Encoding: 
> chunked
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Connection: 
> Keep-Alive
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> User-Agent: 
> Sardine/UNAVAILABLE
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Authorization: Basic 
> amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:12:121 EST [DEBUG] DefaultClientConnection - 
> Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:121 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultClientConnection - 
> Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Server: 
> Microsoft-IIS/7.5
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Date: Mon, 16 Dec 
> 2013 20:20:11 GMT
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Connection can 
> be kept alive indefinitely
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Authentication 
> succeeded
> 2013/12/16 15:20:12:168 EST [DEBUG] TargetAuthenticationStrategy - 
> Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - 
> Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive 
> indefinitely
> 2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - 
> Connection released: [id: 2][route: {}->http://scaramouche:80][total 
> kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - 
> Connection request: [route: {}->http://scaramouche:80][total kept 
> alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - 
> Connection leased: [id: 2][route: {}->http://scaramouche:80][total 
> kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] DefaultHttpClient - Stale 
> connection check
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestAddCookies - CookieSpec 
> selected: best-match
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestAuthCache - Re-using cached 
> 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestTargetAuthentication - 
> Target auth state: CHALLENGED
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestProxyAuthentication - Proxy 
> auth state: UNCHALLENGED
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultHttpClient - Attempt 1 to 
> execute request
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Sending 
> request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info 
> HTTP/1.1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> PUT 
> /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info HTTP/1.1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Content-Type: 
> ISO-8859-1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Transfer-Encoding: 
> chunked
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Connection: 
> Keep-Alive
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> User-Agent: 
> Sardine/UNAVAILABLE
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Authorization: Basic 
> amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - 
> Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - 
> Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << Server: 
> Microsoft-IIS/7.5
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << Date: Mon, 16 Dec 
> 2013 20:20:11 GMT
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Connection can 
> be kept alive indefinitely
> 2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Authentication 
> succeeded
> 2013/12/16 15:20:12:171 EST [DEBUG] TargetAuthenticationStrategy - 
> Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - 
> Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive 
> indefinitely
> 2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - 
> Connection released: [id: 2][route: {}->http://scaramouche:80][total 
> kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 
> 
> 
> 
> 
> 
> 
> This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
> Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
> If you have received this e-mail in error, please contact the sender and delete all copies. 
> Opinions, conclusions or other information contained in this e-mail may not be that of the organization.



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete all copies. 
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete all copies. 
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


RE: connection closed on first attempt to send to IIS WebDav server

Posted by "Boxer, Aaron" <Aa...@uhn.ca>.
Hi Oleg,
.....

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Monday, December 16, 2013 5:01 PM
To: HttpClient User Discussion
Subject: Re: connection closed on first attempt to send to IIS WebDav server

On Mon, 2013-12-16 at 20:20 +0000, Boxer, Aaron wrote:
> Hello,
> I am using the sardine java WebDav client (which uses HTTPClient) to send files using WebDav protocol to an IIS 7.5 server.
> Authentication is Basic.
> 
> I always get the connection closed with a socket connection on my *first* put to the server;  any subsequent puts are fine.
> 
> Below is a debug trace for sending two files.
> 
> Thanks!
> Aaron
> 

Looks really like a server side issue. 

Can you tell me what version of HttpClient is being used?


Thanks, I am using the latest version of httpclient -  4.3.2-SNAPSHOT

By the way, below are the logs from the web server; it seems that the first two requests (with 401.2 responses)
don't have a user name in the request.  

#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2013-12-16 20:12:48 10.7.11.181 HEAD /upload - 80 - 10.7.11.181 - 401 2 5 82
2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.1 - 80 - 10.7.11.181 Sardine/UNAVAILABLE 401 2 5 0
2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.1 - 80 jdmi 10.7.11.181 Sardine/UNAVAILABLE 201 0 0 177
2013-12-16 20:12:54 10.7.11.181 PUT /upload/c3fb63f7-330d-49d2-af15-ff199ce65fd1.2 - 80 jdmi 10.7.11.181 Sardine/UNAVAILABLE 201 0 0 67




> ////////////////////////////////////////////////////////////////////////////////////////////////
> 
> 2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
> 2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:11:971 EST [DEBUG] DefaultClientConnectionOperator - Connecting to scaramouche:80
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestAuthCache - Auth cache not set in the context
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestTargetAuthentication - Target auth state: UNCHALLENGED
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
> 2013/12/16 15:20:11:972 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
> 2013/12/16 15:20:11:972 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:974 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 401 Unauthorized
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << HTTP/1.1 401 Unauthorized
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Cache-Control: private
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Type: text/html; charset=utf-8
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << WWW-Authenticate: Basic realm="scaramouche"
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Length: 6321
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Authentication required
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - scaramouche:80 requested authentication
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Authentication schemes in the order of preference: [negotiate, Kerberos, NTLM, Digest, Basic]
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for negotiate authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Selected authentication options: [BASIC]
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestAuthCache - Auth cache not set in the context
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - Generating response to an authentication challenge using basic scheme
> 2013/12/16 15:20:11:976 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
> 2013/12/16 15:20:11:976 EST [DEBUG] DefaultHttpClient - Attempt 2 to execute request
> 2013/12/16 15:20:11:976 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - Connection 0.0.0.0:55055<->10.7.11.181:80 closed
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Closing the connection.
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - Connection 0.0.0.0:55055<->10.7.11.181:80 closed
> 2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - I/O exception (java.net.SocketException) caught when processing request: Connection reset
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Connection reset <java.net.SocketException: Connection reset>java.net.SocketException: Connection reset
>        at java.net.SocketInputStream.read(SocketInputStream.java:196)
>        at java.net.SocketInputStream.read(SocketInputStream.java:122)
>        at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
>        at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
>        at org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:95)
>        at org.apache.http.impl.AbstractHttpClientConnection.isResponseAvailable(AbstractHttpClientConnection.java:244)
>        at org.apache.http.impl.conn.ManagedClientConnectionImpl.isResponseAvailable(ManagedClientConnectionImpl.java:186)
>        at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:217)
>        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
>        at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
>        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
>        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:214)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)
>        at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:807)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:739)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:722)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:710)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:680)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:673)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:666)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:660)
>        at wjhk.jupload2.upload.FileUploadThreadWebDAV.beforeFile(FileUploadThreadWebDAV.java:157)
>        at wjhk.jupload2.upload.DefaultFileUploadThread.doNonChunkedUpload(DefaultFileUploadThread.java:694)
>        at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:527)
>        at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:336)
> 
> 2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - Retrying request
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Reopening the direct connection.
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnectionOperator - Connecting to scaramouche:80
> 2013/12/16 15:20:11:979 EST [DEBUG] DefaultHttpClient - Attempt 3 to execute request
> 2013/12/16 15:20:11:979 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:11:980 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:11:980 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:118 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:118 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
> 2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Authentication succeeded
> 2013/12/16 15:20:12:119 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Stale connection check
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestAuthCache - Re-using cached 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
> 2013/12/16 15:20:12:120 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
> 2013/12/16 15:20:12:120 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:12:121 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:121 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Authentication succeeded
> 2013/12/16 15:20:12:168 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
> 2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] DefaultHttpClient - Stale connection check
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestAuthCache - Re-using cached 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info HTTP/1.1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info HTTP/1.1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
> 2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Authentication succeeded
> 2013/12/16 15:20:12:171 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
> 2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 
> 
> 
> 
> 
> 
> 
> This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
> Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
> If you have received this e-mail in error, please contact the sender and delete all copies. 
> Opinions, conclusions or other information contained in this e-mail may not be that of the organization.



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete all copies. 
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: connection closed on first attempt to send to IIS WebDav server

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2013-12-16 at 20:20 +0000, Boxer, Aaron wrote:
> Hello,
> I am using the sardine java WebDav client (which uses HTTPClient) to send files using WebDav protocol to an IIS 7.5 server.
> Authentication is Basic.
> 
> I always get the connection closed with a socket connection on my *first* put to the server;  any subsequent puts are fine.
> 
> Below is a debug trace for sending two files.
> 
> Thanks!
> Aaron
> 

Looks really like a server side issue. 

Can you tell me what version of HttpClient is being used?

Oleg

> ////////////////////////////////////////////////////////////////////////////////////////////////
> 
> 2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
> 2013/12/16 15:20:11:971 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:11:971 EST [DEBUG] DefaultClientConnectionOperator - Connecting to scaramouche:80
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestAuthCache - Auth cache not set in the context
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestTargetAuthentication - Target auth state: UNCHALLENGED
> 2013/12/16 15:20:11:972 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
> 2013/12/16 15:20:11:972 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
> 2013/12/16 15:20:11:972 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:11:972 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:974 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 401 Unauthorized
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << HTTP/1.1 401 Unauthorized
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Cache-Control: private
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Type: text/html; charset=utf-8
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << WWW-Authenticate: Basic realm="scaramouche"
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
> 2013/12/16 15:20:11:975 EST [DEBUG] headers - << Content-Length: 6321
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Authentication required
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - scaramouche:80 requested authentication
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Authentication schemes in the order of preference: [negotiate, Kerberos, NTLM, Digest, Basic]
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for negotiate authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
> 2013/12/16 15:20:11:975 EST [DEBUG] DefaultHttpClient - Selected authentication options: [BASIC]
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestAuthCache - Auth cache not set in the context
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
> 2013/12/16 15:20:11:975 EST [DEBUG] RequestTargetAuthentication - Generating response to an authentication challenge using basic scheme
> 2013/12/16 15:20:11:976 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
> 2013/12/16 15:20:11:976 EST [DEBUG] DefaultHttpClient - Attempt 2 to execute request
> 2013/12/16 15:20:11:976 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:976 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - Connection 0.0.0.0:55055<->10.7.11.181:80 closed
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Closing the connection.
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnection - Connection 0.0.0.0:55055<->10.7.11.181:80 closed
> 2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - I/O exception (java.net.SocketException) caught when processing request: Connection reset
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Connection reset <java.net.SocketException: Connection reset>java.net.SocketException: Connection reset
>        at java.net.SocketInputStream.read(SocketInputStream.java:196)
>        at java.net.SocketInputStream.read(SocketInputStream.java:122)
>        at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
>        at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
>        at org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:95)
>        at org.apache.http.impl.AbstractHttpClientConnection.isResponseAvailable(AbstractHttpClientConnection.java:244)
>        at org.apache.http.impl.conn.ManagedClientConnectionImpl.isResponseAvailable(ManagedClientConnectionImpl.java:186)
>        at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:217)
>        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
>        at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
>        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
>        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:214)
>        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)
>        at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:807)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:739)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:722)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:710)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:680)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:673)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:666)
>        at com.github.sardine.impl.SardineImpl.put(SardineImpl.java:660)
>        at wjhk.jupload2.upload.FileUploadThreadWebDAV.beforeFile(FileUploadThreadWebDAV.java:157)
>        at wjhk.jupload2.upload.DefaultFileUploadThread.doNonChunkedUpload(DefaultFileUploadThread.java:694)
>        at wjhk.jupload2.upload.DefaultFileUploadThread.doUpload(DefaultFileUploadThread.java:527)
>        at wjhk.jupload2.upload.DefaultFileUploadThread.run(DefaultFileUploadThread.java:336)
> 
> 2013/12/16 15:20:11:978 EST [INFO] DefaultHttpClient - Retrying request
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultHttpClient - Reopening the direct connection.
> 2013/12/16 15:20:11:978 EST [DEBUG] DefaultClientConnectionOperator - Connecting to scaramouche:80
> 2013/12/16 15:20:11:979 EST [DEBUG] DefaultHttpClient - Attempt 3 to execute request
> 2013/12/16 15:20:11:979 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.1 HTTP/1.1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:11:979 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:11:980 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:11:980 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:118 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
> 2013/12/16 15:20:12:118 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:118 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
> 2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Authentication succeeded
> 2013/12/16 15:20:12:119 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:119 EST [DEBUG] DefaultHttpClient - Stale connection check
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestAuthCache - Re-using cached 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
> 2013/12/16 15:20:12:120 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
> 2013/12/16 15:20:12:120 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
> 2013/12/16 15:20:12:120 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.2 HTTP/1.1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:12:120 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:12:121 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:121 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
> 2013/12/16 15:20:12:168 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
> 2013/12/16 15:20:12:168 EST [DEBUG] DefaultHttpClient - Authentication succeeded
> 2013/12/16 15:20:12:168 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
> 2013/12/16 15:20:12:168 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - Connection request: [route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] PoolingClientConnectionManager - Connection leased: [id: 2][route: {}->http://scaramouche:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
> 2013/12/16 15:20:12:169 EST [DEBUG] DefaultHttpClient - Stale connection check
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestAddCookies - CookieSpec selected: best-match
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestAuthCache - Re-using cached 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestTargetAuthentication - Target auth state: CHALLENGED
> 2013/12/16 15:20:12:170 EST [DEBUG] RequestProxyAuthentication - Proxy auth state: UNCHALLENGED
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultHttpClient - Attempt 1 to execute request
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Sending request: PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info HTTP/1.1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> PUT /upload/0ab3aedd-5efe-428c-a791-f8e38885c874.info HTTP/1.1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Expect: 100-continue
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Content-Type: ISO-8859-1
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Transfer-Encoding: chunked
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Host: scaramouche:80
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Connection: Keep-Alive
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> User-Agent: Sardine/UNAVAILABLE
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - >> Authorization: Basic amRtaTpCYW5hbmExMSEhAAAAAAAA
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 100 Continue
> 2013/12/16 15:20:12:170 EST [DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 201 Created
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << HTTP/1.1 201 Created
> 2013/12/16 15:20:12:170 EST [DEBUG] headers - << Server: Microsoft-IIS/7.5
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << X-Powered-By: ASP.NET
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << Date: Mon, 16 Dec 2013 20:20:11 GMT
> 2013/12/16 15:20:12:171 EST [DEBUG] headers - << Content-Length: 0
> 2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
> 2013/12/16 15:20:12:171 EST [DEBUG] DefaultHttpClient - Authentication succeeded
> 2013/12/16 15:20:12:171 EST [DEBUG] TargetAuthenticationStrategy - Caching 'basic' auth scheme for http://scaramouche:80
> 2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - Connection [id: 2][route: {}->http://scaramouche:80] can be kept alive indefinitely
> 2013/12/16 15:20:12:171 EST [DEBUG] PoolingClientConnectionManager - Connection released: [id: 2][route: {}->http://scaramouche:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
> 
> 
> 
> 
> 
> 
> 
> This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
> Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
> If you have received this e-mail in error, please contact the sender and delete all copies. 
> Opinions, conclusions or other information contained in this e-mail may not be that of the organization.



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org