Subject: Content-Length and 1xx status codes

From: Adrien de Croy <[email-masked]>
Date: Thu, 17 Jan 2008 13:33:53 +1300

Hi

I've recently come across a problem where a server a client is talking 
to is replying to a POST with

HTTP/1.1 100 Continue
Content-Length: 0

etc

According to my reading of the RFC, a Content-Length field indicates the 
presence of a message body, and message bodies are specifically 
prohibited on 1xx messages.

So is is therefore by extension prohibited to have a Content-Length (of 
any value) or Transfer-Encoding field on a 1xx message as well?

Regards

Adrien

-- 
Adrien de Croy - WinGate Proxy Server - http://www.wingate.com

---

From: Henrik Nordström <[email-masked]>
Date: Thu, 17 Jan 2008 15:07:47 +0100

> prohibited on 1xx messages.

Correct, but many implementations gets this wrong and sends 0 when they
mean none..

> any value) or Transfer-Encoding field on a 1xx message as well?

Yes, but you may want to accept 0 length bodies anyway. See "Message
Length" case 1. "regardless of..."

Regards
Henrik