Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 98998 invoked by uid 500); 2 Mar 2000 04:28:57 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 98965 invoked from network); 2 Mar 2000 04:28:57 -0000 Date: Wed, 1 Mar 2000 20:31:43 -0800 (PST) From: Greg Stein To: new-httpd@apache.org Subject: Re: [PATCH] Extra CRLF in chunked response In-Reply-To: <38BDED43.4B26656F@weezel.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N On Wed, 1 Mar 2000, Jeremy Devenport wrote: > I'm really new to the Apache 2.0 code base but it looks like an extra > CRLF is being sent after the trailer chunk. > > Jeremy Devenport > > --- http_protocol.c 2000/01/31 19:21:37 1.53 > +++ http_protocol.c 2000/03/02 04:22:04 > @@ -1667,7 +1667,6 @@ > > ap_rputs("0\015\012", r); > /* If we had footer "headers", we'd send them now */ > - ap_rputs("\015\012", r); > } > } The spec for the chunked-transfer encoding is at: http://andrew2.andrew.cmu.edu/rfc/rfc2616.html#sec-3.6.1 As you can see, the "last-chunk" symbol is "0" CRLF. This is followed by a set of "trailer" entries. Finally, a CRLF terminates the entire transfer. Therefore, the above code is correct. I thought I saw this same problem in 1.3 when I wrote some chunked-transfer client code, almost sent some mail, but then reviewed the spec one more time... Cheers, -g -- Greg Stein, http://www.lyra.org/