You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Darrell Esau <da...@gmail.com> on 2008/06/03 01:21:40 UTC

Changing order of headers in a multipart post

Hi all,

I'm posting multipart form data to a web service which expects the
headers in a certain order.

Particularly, each part contains a "Content-Type" and
"Content-Disposition" header.

If I send the data with the "Content-Disposition" header before the
"Content-Type" header, it fails.
Swapping the two makes the request complete successfully.

so -- my question --

Is it possible in HttpClient (3.1) to specify order of the part headers?

Thanks,
-darrell

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


Re: Changing order of headers in a multipart post

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2008-06-02 at 16:21 -0700, Darrell Esau wrote:
> Hi all,
> 
> I'm posting multipart form data to a web service which expects the
> headers in a certain order.
> 
> Particularly, each part contains a "Content-Type" and
> "Content-Disposition" header.
> 
> If I send the data with the "Content-Disposition" header before the
> "Content-Type" header, it fails.
> Swapping the two makes the request complete successfully.
> 
> so -- my question --
> 
> Is it possible in HttpClient (3.1) to specify order of the part headers?
> 
> Thanks,
> -darrell
> 

Darrell,

The only option you have is to extend the Part class and override its
#send(OutputStream) method.

Oleg


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 


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