rfc2616

Is an HTTP application that sends a Content-Length or Transfer-Encoding with a 204 No Content response broken?

I can't tell from RFC 2616 whether an HTTP client should accept a 204 No Content response that includes Content-Length: 0 or Transfer-Encoding: chunked headers. These headers seem to break some HTTP clients and proxies, which apparently attempt to read the empty response body, but the spec reads: Any response message which "MUST N...

For HTTP responses with Content-Types suggesting character data, which charset should be assumed by the client if none is specified?

If no charset parameter is specified in the Content-Type header, RFC2616 section 3.7.1 seems to imply ISO8859-1 should be assumed for media types of subtype "text": When no explicit charset parameter is provided by the sender, media subtypes of the "text" type are defined to have a default charset value of "ISO-8859-1" when r...

Win32: What is the status of chunked encoding support in WinHttpReadData?

The documentation for WinHttpReadData says, regarding HTTP's chunked transfer coding: Starting in Windows Vista and Windows Server 2008, WinHttp enables applications to perform chunked transfer encoding on data sent to the server. When the Transfer-Encoding header is present on the WinHttp response, WinHttpReadData strips the chunki...

Correct syntax of a HTTP 100 Continue response

For me, one of the weakest points of the HTTP 1.1 RFC and the various implementations around is how to deal with 100 Continue headers. I searched on the web for a while and had a look at different implementations. However, there is one thing I'm not sure of. what is the correct syntax of a 100 Continue message? Several sources claim, t...

Parsing every part of an HTTP header field-value

Hi all. I'm parsing HTTP data directly from packets (either TCP reconstructed or not, you can assume it is). I'm looking for the best way to parse HTTP as accurately as possible. The main issue here is the HTTP header. Looking at the basic RFC of HTTP/1.1, it seems that HTTP header parsing would be complex. The RFC describes very com...

HTTP: What is the preferred Accept-Encoding for "gzip,deflate"?

This question is regarding the order of precedence for the media-types of the HTTP Header "Accept-Encoding" when all are of equal weight and has been prompted by this comment on my blog. Background: The Accept-Encoding header takes a comma separated list of media-types the browser can accept e.g. gzip,deflate A quality factor can also...

HTTP 1.1 Pipelining

Hi, I have to implement an HTTP client in Java and for my needs it seems that the most efficient way to do it, is implement HTTP pipeline (as per RFC2616). As an aside, I want to pipeline POSTs. (Also I am not talking about multiplexing. I am talking about pipelining i.e. many requests over one connection before receiving any response-...

How to implement in Asymmentric algorithm on Midp2.0 Mobiles

Dear All, How to implement Bouncycastle Asymmentric algorithm in Midp2.0 Mobiles.The algorithm is working good in Midp2.1 Mobiles,but Midp 2.0 mobiles i got classNotFound Exception and java/security no such class error.Please give me the guideline for overcoming the issue. ...

Is there ever any reason to respond with "Vary: *" and "Vary: Foo" for the same resource?

Is there any reason for a HTTP server to sometimes respond with Vary: *, and sometimes with Vary: Foo, to requests for the same resource? What should a cache do, if after receiving (and caching) both responses, it then receives a request with a matching Foo header, for which the Vary: Foo response is suitable? Can it serve the matchin...

Cache-control: private and public

What should a http client do if server returned Cache-Control: private, public ? I have a feeling private should override public, but I can't find a confirmation in the RFC (other than MUST in private and MAY in public). ...