Re: HTTP rfc related question, Content-length: 0 in GET request

> The problem is that a system, which relies on HTTP protocol, refuses to
> accept GET requests with header 'Content-length: 0'. This header added
> to request doesn't bring any information, and should be ignored by a
> system which relies on HTTP protocol, am i correct?

Why ignored? It precisely says that the Entity field of the request is
empty. Content-Length: 0 is a valid value.

>
> The sample request which causes error:
>
> GET /somepath/gfx.png HTTP/1.1
> ...som other headers
> Content-length: 0
>
> Perhaps you've faced similar problem previously and have some
> experiences.
> Is there any general rule in HTTP/1.1 protocol which allows or forbids
> 'Content-length: 0' header in GET requests?

It sounds like your system is in fault rather than HTTP :)
Or I don't understand your correctly.
In any case, the only place to look:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4

- Sylvain

Received on Wednesday, 21 June 2006 14:38:07 UTC