Received: by taz.hyperreal.com (8.7.5/V2.0) id SAA00129; Fri, 23 Aug 1996 18:48:38 -0700 (PDT) Received: from localhost by taz.hyperreal.com (8.7.5/V2.0) with SMTP id SAA00124; Fri, 23 Aug 1996 18:48:37 -0700 (PDT) X-Received: from inet-dev.bellglobal.com by taz.hyperreal.com (8.7.5/V2.0) with ESMTP id GAA19100; Fri, 23 Aug 1996 06:30:42 -0700 (PDT) From: rasmus@bellglobal.com X-Received: from inet-dev ([199.243.250.207]) by inet-dev.bellglobal.com (Netscape Mail Server v2.0) with SMTP id AAA3295 for ; Fri, 23 Aug 1996 09:31:11 -0400 Date: Fri, 23 Aug 1996 09:31:11 -0400 (EDT) Subject: Double content-type bug - false alarm To: new-httpd@hyperreal.com Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII ReSent-Date: Fri, 23 Aug 1996 18:48:34 -0700 (PDT) ReSent-From: Brian Behlendorf ReSent-To: new-httpd@hyperreal.com ReSent-Message-ID: Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com I had a closer look at this. It was my own bug. Didn't realize it was a bad thing to table_set() the content-type string in a module. When Apache sends the header, it isn't smart enough to notice that the content-type is defined in the header table and goes ahead and sends it even though it already sent the content-type string from r->content_type. Not really a bug, but it might be nice if there was a little check to precent this. Something like: *** http_protocol.c Sun Jun 23 14:05:16 1996 --- http_protocol.c.new Fri Aug 23 09:25:25 1996 *************** *** 730,733 **** --- 730,734 ---- for (i = 0; i < hdrs_arr->nelts; ++i) { if (!hdrs[i].key) continue; + if(!strcasecmp(hdrs[i].key,"content-type") && r->content_type) continue; bvputs(fd, hdrs[i].key, ": ", hdrs[i].val, "\015\012", NULL); } This assumes the r->content_type is the appropriate content type to send. The check could be earlier on and made to skip sending r->content_type if a content_type header table element exists. Not sure which is preferred. But it is certainly appropriate to only send one. -Rasmus