[ 
https://issues.apache.org/jira/browse/HTTPCORE-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCORE-173.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0-beta3

HttpCore will tolerate the missing closing chunk if the chunk coded content is 
terminated by the end of stream (EOF) condition of the closed connection.

Oleg

> IOException when server closes connection at end of chunk
> ---------------------------------------------------------
>
>                 Key: HTTPCORE-173
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-173
>             Project: HttpComponents HttpCore
>          Issue Type: Wish
>          Components: HttpCore
>    Affects Versions: 4.0-beta2
>            Reporter: Charles Honton
>             Fix For: 4.0-beta3
>
>         Attachments: c.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to