On Thu, 2013-02-21 at 21:14 +0100, Roman Kennke wrote: > Hello, > > I am trying to post a multipart entity body using MultipartEntity. I > need to use an InputStreamBody, which is non-repeatable (because its > getContentLength() returns -1). However, I get an exception in > DefaultRequestDirector.tryExecute(). The first thing that happens in > this loop is that it checks if the entity is repeatable, and if not, it > throws an exception, even though it hasn't even tried once. > > http://fpaste.org/J1Nm/ > > When I get there, retryReason is still null, and I end up getting the > 2nd exception thrown. This seems bogus to me. There should not be an > else-branch and it should try at least once. Or am I totally missing > something here? > > Roman >
Roman This may be non-obvious but request repeatability is determined by the request wrapper that keeps track of whether or not the request entity has been consumed (at least once). See EntityEnclosingRequestWrapper#isRepeatable() implementation http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/client/EntityEnclosingRequestWrapper.html#81 Hope this helps Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
