Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 71407 invoked from network); 10 May 2005 11:33:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 May 2005 11:33:40 -0000 Received: (qmail 92843 invoked by uid 500); 10 May 2005 11:37:01 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 92751 invoked by uid 500); 10 May 2005 11:37:00 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 92732 invoked by uid 99); 10 May 2005 11:37:00 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from odoko.co.uk (HELO odoko.co.uk) (80.68.92.132) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 10 May 2005 04:37:00 -0700 Received: from elfriedeholmes.demon.co.uk ([80.177.165.206] helo=[10.0.0.3]) by odoko.co.uk with asmtp (Exim 4.34) id 1DVT3d-0001n0-V1 for dev@cocoon.apache.org; Tue, 10 May 2005 12:37:50 +0100 Message-ID: <42809C09.40105@odoko.co.uk> Date: Tue, 10 May 2005 12:33:29 +0100 From: Upayavira Organization: Odoko Ltd User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: User-Agent in Command-line interface References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N James Bates wrote: > The Cocoon command line interface provides a switch for simulating the > Cocoon User-Agent header that would be sent by a browser. The idea being > that it could be used by e.g. the browser selector to �detect� that a > request is coming from the CLI. > > > > When investigating however, I noticed that the Cocoon bean (the class > that implements the CLI) does not place the User-Agent into a HEDAER, > but into a request PARAMETER instead (occurs on line 407 of > CocoonWrapper.java, in method processURI() in BRANCH_2_1_X; line 421 of > the same file in 2.2 trunk). > > > > Is there a particular reason for this behaviour? Would it be desirable > to change the behaviour so the User-Agent is indeed submitted as a > request HEADER, thus perfectly emulating a HTTP call? I am perfectly > willing to submit a patch to that effect... The CLI/bean should work exactly the same as a browser. I have seen that on occasions and wondered about it. What you are saying makes sense, and I'd happily commit a patch of yours. Regards, Upayavira