cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: User-Agent in Command-line interface
Date Tue, 10 May 2005 11:33:29 GMT
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 
>, 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

View raw message