hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Crossley" <jim.cross...@cptii.com>
Subject POST to IIS/5.0 responses
Date Thu, 06 Feb 2003 16:12:30 GMT
Hi all.  I have successfully used httpclient to post files to a web
server using the MultipartPostMethod class.

I can post directly to an Apache 1.3 web server and I can post to an IIS
5.0 server via a Microsoft IAS web proxy.

But when I try to post directly to the IIS 5.0 server (no proxy
involved), it appears that the server is returning some responses that
confuse httpclient.  Can anyone point me in the direction of a fix?  I
have a demo tomorrow.  :-0

Here's the output:

 HttpConnection - -HttpConnection.setSoTimeout(0)
 HttpMethod - -Execute loop try 1
 wire - ->> "POST /d3_upload/ul.aspx HTTP/1.1

 HttpMethod - -Adding Host request header
 wire - ->> "Content-Length: 2061

 wire - ->> "Host: 209.90.164.72

 wire - ->> "User-Agent: Jakarta Commons-HttpClient/2.0M1

 wire - ->> "Content-Type: multipart/form-data;
boundary=----------------314159265358979323846

 wire - ->> [\r\n]
 wire - -<< "HTTP/1.1 100 Continue" [\r\n]
 wire - -<< "Server: Microsoft-IIS/5.0" [\r\n]
 wire - -<< "Date: Thu, 06 Feb 2003 13:02:25 GMT" [\r\n]
 HttpMethod - -Received status CONTINUE but the body has already been
sent
 wire - -<< "HTTP/1.1 200 OK" [\r\n]
 wire - -<< "Server: Microsoft-IIS/5.0" [\r\n]
 wire - -<< "Date: Thu, 06 Feb 2003 13:02:25 GMT" [\r\n]
 wire - -<< "Transfer-Encoding: chunked" [\r\n]
 wire - -<< "Cache-Control: private" [\r\n]
 wire - -<< "Content-Type: text/html" [\r\n]
org.apache.commons.httpclient.HttpRecoverableException:
java.io.IOException: chunked stream ended unexpectedly
	at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase
.java:1662)
	at
org.apache.commons.httpclient.HttpMethodBase.writeRemainingRequestBody(H
ttpMethodBase.java:2354)
	at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java
:912)
	at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:5
57)
	at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:4
74)
	at com.cptii.d3.Poster.post(Poster.java:61)
	at com.cptii.d3.MessagePoster.flush(MessagePoster.java:82)
	at com.cptii.d3.MessagePoster.access$100(MessagePoster.java:21)
	at
com.cptii.d3.MessagePoster$Collector.run(MessagePoster.java:142)
	at java.util.TimerThread.mainLoop(Timer.java:432)
	at java.util.TimerThread.run(Timer.java:382)

Mime
View raw message