jira-importer opened a new issue, #1350: URL: https://github.com/apache/httpcomponents-core/issues/1350
**[Charles Honton](https://issues.apache.org/jira/secure/[email protected])** opened **[HTTPCORE-173](https://issues.apache.org/jira/browse/HTTPCORE-173?redirect=false)** and commented My program sending a POST to a server which responds with a chunked response. Instead of a final 0 length chunk, the server closes the connection. The following is a redacted log: > POST /Activity/ActivityFile.aspx HTTP/1.1[\r][\n]" > Referer: https://ranking.ase.com/Activity/ActivityForm.aspx?AI=127910002[\r][\n] > User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)[\r][\n] > Host: ranking.ase.com[\r][\n] > Cookie: Session=EBFJLZR1D17M12RBX3V; auth-user-info=st75|204402|224243[\r][\n] > Content-Length: 55[\r][\n] > Content-Type: application/x-www-form-urlencoded[\r][\n] > [\r][\n] > __EVENTTARGET=&__EVENTARGUMENT=&UserAccount=27910002 << HTTP/1.1 200 OK[\r][\n] << Date: Wed, 10 Sep 2008 16:44:09 GMT[\r][\n] << Server: Microsoft-IIS/6.0[\r][\n] << X-Powered-By: ASP.NET[\r][\n] << X-AspNet-Version: 2.0.50727[\r][\n] << content-disposition: inline; filename=JPMC.SFX[\r][\n] << Transfer-Encoding: chunked[\r][\n] << Cache-Control: private[\r][\n] << Content-Type: application/vnd.inu.SFX; charset=utf-8[\r][\n] << [\r][\n] << 1a[\r][\n] << [\r][\n] The response data[\r][\n] << [\r][\n] java.io.IOException: chunked stream ended unexpectedly org.apache.commons.httpclient.ChunkedInputStream.getChunkSizeFromInputStream(ChunkedInputStream.java:252) org.apache.commons.httpclient.ChunkedInputStream.nextChunk(ChunkedInputStream.java:221) org.apache.commons.httpclient.ChunkedInputStream.read(ChunkedInputStream.java:176) java.io.FilterInputStream.read(Unknown Source) org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108) org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:740) org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:838) com.cc.wb.WebBrowser.redirectFetch(WebBrowser.java:184) com.cc.wb.WebBrowser.fetch(WebBrowser.java:235) com.cc.wb.WebBrowser.postURL(WebBrowser.java:290) com.cc.wb.Tester.main(Tester.java:41) The server's behavior is probably not consistent with RFC2616, but it would be nice if http-client could handle this without an IOException. --- **Affects:** 4.0-beta2 **Attachments:** - [c.patch](https://issues.apache.org/jira/secure/attachment/12389957/c.patch) (_3.25 kB_) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
