Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 88324 invoked from network); 30 Sep 2008 13:50:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Sep 2008 13:50:42 -0000 Received: (qmail 85630 invoked by uid 500); 30 Sep 2008 13:50:30 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 85616 invoked by uid 500); 30 Sep 2008 13:50:30 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 85600 invoked by uid 99); 30 Sep 2008 13:50:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Sep 2008 06:50:30 -0700 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of drshade@gmail.com designates 209.85.198.243 as permitted sender) Received: from [209.85.198.243] (HELO rv-out-0708.google.com) (209.85.198.243) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Sep 2008 13:49:26 +0000 Received: by rv-out-0708.google.com with SMTP id c5so22381rvf.24 for ; Tue, 30 Sep 2008 06:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=BtcgQMU6znFnBXMvN76UHXJoV18qR5g0RFaAGDUhX+E=; b=HLxxzwsp66JkC4x5acjSk6vpnosZGel2BSq0UAed92pXSLKin5GCpwNKho6TlFMBDC 4S/V3W5tt25gkBpUuKpeusJyWhlW0a+kouBX21lAs7pDS/Rl/aN0M4gH8vsPbqiJFZoz jbpHkh/pB28QYB+9FQS6AyWV0sbSY9t7ciSg0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=tvlJUldTlOcyvnq7aHVBAcidn5GFb8LM7/JJlUIN8csmO/KRm/d7pZlVkV/j0ZN9jC eAotXSlfmzEvxPBlB5LFg2qRess8BAo0GlCs+v3cj9BUkZDPpHWxFMUS6nmUUiAvDUg0 DXFEi5U+VFAy1h8V6OuLqj1vld3m38tcUFO9A= Received: by 10.141.41.12 with SMTP id t12mr3338948rvj.282.1222782600819; Tue, 30 Sep 2008 06:50:00 -0700 (PDT) Received: by 10.140.204.10 with HTTP; Tue, 30 Sep 2008 06:50:00 -0700 (PDT) Message-ID: Date: Tue, 30 Sep 2008 09:50:00 -0400 From: "Tom Wells" To: users@httpd.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Mod_Proxy and 100-Continue Hi Group I'm fairly confident I've found a bug in mod_proxy in Apache 2.2.9 but would like your opinion before I log anything to the bug tracker. It's something I discovered while working in mod_python, but I've managed to get it occurring with a bare-bones Apache 2.2.9 setup using only mod_proxy and mod_headers: This is my vhost configuration: ProxyRequests Off Order Deny,Allow Allow from all ServerName munchkin.synthesis.co.za Header add Set-Cookie "MOD_PROXY_FOOD=FOO;" early Header add Set-Cookie "MOD_PROXY_KEEP=BAR;" ProxyPass http://192.168.16.225:8118/sonik/ ErrorLog /home/tom/dev/apache/deploy/logs/error.log LogLevel notice CustomLog /home/tom/dev/apache/deploy/logs/access.log combined The config above is forwarding requests to /sonik/ to another host after setting two cookies, one early and one late. I am no Apache guru, but as I understand it the early cookie is set before handlers are processed (i.e. before modproxy kicks in) and the late will be appended to the response after modproxy has done it's processing and produced a complete response. Also (as far as I understand) modproxy should try to preserve any headers already set before processing by merging the headers before and after processing (especially any Set-Cookie headers). So in general this works as expected, with both cookies being returned to the caller for regular GET and POST requests. However the problem I've noticed is where the request contains an "Expect:100-Continue", that the early cookie is discarded by modproxy. After some further investigation the root problem appears that modproxy doesn't handle the "HTTP/1.1 100 Continue\r\n\r\n" within the response from the back-end host nicely when performing the merging of headers. I discovered this by writing back both of these responses from the back-end host: "HTTP/1.1 200 OK Content-Length: 1 " And "HTTP/1.1 100 Continue HTTP/1.1 200 OK Content-Length: 1 " The first response produces a final response to the client which contains both Set-Cookie headers, and the second response produces a final response to the client which contains only the late Set-Cookie header. Maybe this is normal modproxy behaviour, I can't be certain, but reading through some of mod_proxy_http.c seems to show that this is the intention. However I was able to test this on another Apache instance running 2.2.4 and modproxy retains both cookies in both cases. So either this is a bug in 2.2.9 or it's a bug that was fixed since 2.2.4. Your thoughts? Thanks, Tom -- http://www.tomwells.org --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org