hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: AW: Set Content-length in mulitpart headers
Date Wed, 09 Feb 2005 21:56:37 GMT
On Wed, 2005-02-09 at 22:40 +0100, Ham MI-EN Oliver Rennert wrote:
> Oleg
> 
> RFC2616, section 4.4 states that "Messages MUST NOT
> include both a Content-Length header field and a non-
> identity transfer-coding. If the message does include a
> non- identity transfer-coding, the Content-Length MUST
> be ignored."

Again, you are confusing HTTP content with MIME content. These are not
the same things. RFC 2616 defines the HTTP/1.1 protocol

> 
> That is why I set filePart.setTransferEncoding(null).

Whereas the multipart content is defined in RFC 1521 and RFC 1522.

Hope that clarifies things a little

Oleg


> 
> Unfortunately the server I send the data to requires the length to be sent.
> 
> The question is: How can I configure the client to add this request header?
> 
> Thank you for your help.
> 
> Oliver
> 
> 
> > -----Urspr√ľngliche Nachricht-----
> > Von:
> > httpclient-user-return-344-oliver.rennert=kuehne-nagel.com@jakarta.apach
> > e.org
> > [mailto:httpclient-user-return-344-oliver.rennert=kuehne-nagel.com@jakar
> > ta.apache.org]Im Auftrag von Oleg Kalnichevski
> > Gesendet: Mittwoch, 9. Februar 2005 22:22
> > An: HttpClient User Discussion
> > Betreff: Re: Set Content-length in mulitpart headers
> >
> >
> > Oliver,
> >
> > You are confusing 'Transfer-Encoding' of the HTTP content and that of a
> > MIME part within a multipart/form-data encoded content.
> >
> > It's been a while since I looked at the spec but if my memory does not
> > fail me, Content-length was not required for a MIME part.
> >
> > Oleg
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 


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


Mime
View raw message