It's impossible to override the Rhino (maybe others?) User Agent #98

adatta02 opened this Issue May 20, 2010 · 1 comment


None yet
2 participants

I tried to override the HTTP user agent being sent when using the http module with Rhino by editing the start up script but "Java/1.6.0_18" kept getting appended to it.

I edited narwal-rhino to include:


But requests in my Apache log looked like:

71.232.15.*** - - [20/May/2010:01:41:02 -0400] "POST / HTTP/1.1" 200 5285 "-" "Mozilla/5.0 Java/1.6.0_18"

I didn't have a chance to dig into this further, but patching the http module to include:

connection.setRequestProperty ( "User-agent", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20081202 Firefox (Debian-" );

will let you manually override it in the code.



This comment has been minimized.

Show comment Hide comment

kriskowal May 20, 2010


Can you do a fork?


kriskowal commented May 20, 2010

Can you do a fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment