Subject: Correct status code for unknown transfer-encoding

From: Julian Reschke <[email-masked]>
Date: Mon, 30 Mar 2009 13:57:42 +0200

Hi,

over on stackoverflow.com, somebody asked for the right status code to 
return when the request has a TE: header with an unknown transfer coding 
[1].

The answer is not obvious; is this a client or a server error? Should 
the specification say something about this?

BR, Julian

[1] 
<http://stackoverflow.com/questions/692910/http-transfer-encoding-and-requests>

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Mon, 30 Mar 2009 14:18:56 +0200

>return when the request has a TE: header with an unknown transfer coding 

(It would be better to abbreviate Transfer-Encoding with T-E, not TE.)

>the specification say something about this?

Section 3.6 of RFC 2616:

  A server which receives an entity-body with a transfer-coding it does
  not understand SHOULD return 501 (Unimplemented), and close the
  connection.

So it does address this already.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Julian Reschke <[email-masked]>
Date: Mon, 30 Mar 2009 14:30:26 +0200

> (It would be better to abbreviate Transfer-Encoding with T-E, not TE.)

Missing the smiley here, or are you suggesting to change the protocol on 
the wire? (in which case we should first fix Referer).

> So it does address this already.

Good catch. I was looking at the definition of 501, which has:

"The server does not support the functionality required to fulfill the 
request. This is the appropriate response when the server does not 
recognize the request method and is not capable of supporting it for any 
resource."  -- 
<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-06.html#rfc.section.8.5.2>

So minimally, this should be rephrased so that it doesn't sound as if it 
was a complete list.

BR, Julian

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Mon, 30 Mar 2009 14:57:31 +0200

>the wire? (in which case we should first fix Referer).

I was suggesting that writing TE: when you mean Transfer-Encoding: is
a bad idea because TE: and Transfer-Encoding: are different headers.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Julian Reschke <[email-masked]>
Date: Mon, 30 Mar 2009 15:09:39 +0200

> a bad idea because TE: and Transfer-Encoding: are different headers.

Oops. You're right.

So I was referring to "Transfer-Encoding", not "TE".

BR, Julian