You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2005/06/15 18:02:51 UTC

DO NOT REPLY [Bug 35372] New: - The InputStreamRequestEntity doesnt make sense for chunked streams

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35372>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35372

           Summary: The InputStreamRequestEntity doesnt make sense for
                    chunked streams
           Product: HttpClient
           Version: 3.0 RC4
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Commons HttpClient
        AssignedTo: httpclient-dev@jakarta.apache.org
        ReportedBy: boris.tabenkin@matrixone.com


I just began looking at converting some code that used HttpClient 2.0 to using 3.0.

I ran into the following issue:

When creating InputStreamRequestEntity:
    httppost.setRequestBody(new
InputStreamRequestEntity(pipedIn,PostMethod.CONTENT_LENGTH_CHUNKED));

The PostMethod.CONTENT_LENGTH_CHUNKED is deprecated. You can do a
HttpPost.setChunked(true), but doing so will cause the InputStreamRequestEntity
to calculate the size using a buffered stream, which, in my case, would be a
disaster since I am using this code to upload a large file.

BTW, there should be a HttpPost.getOutputStream() method. I am using the
InputStream with a PipedOutputStream and spinning a background thread to manage
the pipes.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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