Questions tagged [rfc2616]

An RFC entitled "Hypertext Transfer Protocol -- HTTP/1.1"

See for more details on RFC

RFC 2616 was released in june 1999 and supersedes RFC 2068.

Resources:

71 questions
45
votes
8 answers

How to specify DELETE method in a link or form?

Rfc2616 lists many methods besides GET and POST, like, say, DELETE, PUT etc. Method field in html forms, though, seems to be allowed to specify only GET or POST. Is it possible to create a link or form in a html page that uses a request method that…
25
votes
6 answers

Are URIs case-insensitive?

When comparing two URIs to decide if they match or not, a client SHOULD use a case-sensitive octet-by-octet comparison of the entire URIs, with these exceptions: I read above Sentence in Http Rfc I think Url is case-insensitive but i dont…
user1968030
21
votes
2 answers

HTTP status codes : 204 OR 200 with body containing an empty object?

I'm having trouble to understand the use cases of the 204 HTTP status code. The RFC2616 says : 10.2.5 204 No Content The server has fulfilled the request but does not need to return an entity-body, and might want to return updated…
Alexandre Nucera
  • 2,183
  • 2
  • 21
  • 34
14
votes
2 answers

Have Apache Accept LF vs CRLF in Request Headers

I have a legacy product that I'm trying to support on an Apache server and the server only after a recent update began rejecting request headers which only used LF for newlines and it's a tall order to rebuild it because of how old the code base is.…
Nuvious
  • 1,469
  • 2
  • 12
  • 21
14
votes
2 answers

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…
Dave Transom
  • 4,085
  • 3
  • 21
  • 22
12
votes
6 answers

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…
rewbs
  • 1,958
  • 4
  • 22
  • 34
12
votes
1 answer

HTTP/1.1 response to multiple range

While writing my HTTP/1.1 server, I get stuck dealing multiple ranges request. Section 14.35.1 of RFC 2616 refers some examples but doesn't clarify server behaviour. For instance: GET /some/resource HTTP/1.1 ... Range:…
LS_ᴅᴇᴠ
  • 10,823
  • 1
  • 23
  • 46
11
votes
1 answer

Use of Accept-charset HTTP header

What are the differences and advantages of using one over the other: Accept: application/json;charset=utf-8 versus: Accept: application/json Accept-Charset: utf-8 Is the first form compliant to rfc 2616? Note: could be json or xml, etc.
Blessed Geek
  • 21,058
  • 23
  • 106
  • 176
11
votes
2 answers

What is the maximum chunk size in HTTP response with Transfer-Encoding chunked?

The w3.org (RFC2616) seems not to define a maximum size for chunks. But without a maximum chunk-size there is no space for the chunk-extension. There must be a maximum chunk-size, else I can't ignore the chunk-extension as I'm advised to do if it…
schwer
  • 279
  • 1
  • 2
  • 10
11
votes
2 answers

Under what conditions are HTTP request headers removed by proxies?

I'm looking at various methods of RESTfully versioning APIs, and there are three major contenders. I believe I've all but settled on using X-API-Version. Putting that debate aside, one of the arguments against using that header, and custom headers…
wprl
  • 24,489
  • 11
  • 55
  • 70
10
votes
1 answer

Content-Encoding vs Transfer Encoding in HTTP

I have a question on usage of Content-Encoding and Transfer-Encoding: Please let me know if my below understanding is right: Client in its request can specify which encoding types it is willing to accept using accept-encoding header. So, if Server…
Vamsi Mohan
  • 307
  • 1
  • 5
  • 13
9
votes
2 answers

What are the uses for If-None-Match with multiple entities?

I'm using the ETag header for caching and the browser sends a corresponding If-None-Match header. Initially, I simply compared these headers and it worked. Later it occurred to me that rfc2616 allows a list of entities, so I fixed it. The question…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
8
votes
2 answers

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…
Steven Huwig
  • 20,015
  • 9
  • 55
  • 79
8
votes
2 answers

Error code for an invalid POST parameter

What's the proper error code to return when a POST request has an invalid parameter? Say: a form takes data for an event, but the date provided is in the past; or a form takes data for a user registration, but the name provided is a number or any…
7
votes
2 answers

How should HTTP Server respond to HEAD request for chunked encoding

I have a question on how does a HTTP Server response look like when a HEAD is sent to a resource and server decided to perform chunked encoding? If a Server always wishes to perform chunked encoding for a GET on a specific resource, as it does not…
Vamsi Mohan
  • 307
  • 1
  • 5
  • 13
1
2 3 4 5