On Thursday, July 17, 2003, at 02:43 PM, Oleg Kalnichevski wrote:


- another option is to use the "Expect: 100-continue" header. This
feature requires HTTP 1.1 and is not well supported by all web servers.
Try HttpMethod.setRequestHeader("Expect", "100-continue")



David, one small correction. Instead of setting HttpMethod.setRequestHeader("Expect", "100-continue") manually, please use MultipartPostMethod#setUseExpectHeader(boolean)

Oleg

Thanks.

Added these two lines

        client.getState().setAuthenticationPreemptive(true);
        post.setUseExpectHeader(true);

and it now only calls createInputStream once, posting without error.
In reading Adrian's recommendation, it sounds like I can't be guaranteed that it will call createInputStream only once
Does the two settings above guarantee that createInputStream will be called only once, or should I adjust the InputStreamPartSource to handle the case where HttpClient asks for the new stream more than once?


--
David Sean Taylor
Bluesunrise Software
[EMAIL PROTECTED]
+01 707 773-4646




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



Reply via email to