cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: Cocoon + UserAgent Strings
Date Fri, 08 Mar 2002 06:10:39 GMT
On Thu, 7 Mar 2002, Tony Collen wrote:

> I'm playing around with Cocoon, and I'm using <map:generate type="html"
> src="http://foo.bar" /> to generate some XHTML from a website.  I'm
> getting back a 403 Denied error from the server, and I've deduced that
> Cocoon is being denied access to the URL based on the User-Agent string
> that it sends.  I did a little snooping and I came up with the following
> info out of my wwwlogs:
>
> "GET / HTTP/1.1" 200 18919 "-" "Java1.3.1_01"
>
> Is there any way, short of digging through code, to change the
> User-Agent string that Cocoon sends?  If not, is there someone who knows
> the Cocoon source well enough to make the User-Agent string something
> that could be configured through, say, cocoon.xconf?

that is the user-agent string sent by the java.net.URL (or URLConnection)
object when the content request is issued. afaik, it is not
configurable. potential workarounds include:

1. configure the jvm to use a proxy server and change the user-agent
string there.

2. swap the java.net.URL stuff with another java http client, say the one
from the jakarta commons? that might be something you'd best do at the
parser level, though, since i think it's generally responsible for
actually getting the content for a url.

3. get the site maintainer to get their act together and stop forbidding
access to urls based on user agent.

- donald


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message