So the properties parser in CachingOnlineUpdateUASparser was failing
(org.browsermob.proxy.http.BrowserMobHttpClient.java:381) and the
exception caused all requests to get 502 Bad Gateway.
The exception was:
java.lang.StringIndexOutOfBoundsException: String index out of range:
-1
at java.lang.String.substring(String.java:1937)
at
cz.mallat.uasparser.fileparser.PHPFileParser.loadFile(PHPFileParser.java:
65)
at
cz.mallat.uasparser.fileparser.PHPFileParser.<init>(PHPFileParser.java:
29)
at cz.mallat.uasparser.UASparser.loadDataFromFile(UASparser.java:212)
at
cz.mallat.uasparser.CachingOnlineUpdateUASparser.<init>(CachingOnlineUpdateUASparser.java:
55)
at
cz.mallat.uasparser.CachingOnlineUpdateUASparser.<init>(CachingOnlineUpdateUASparser.java:
26)
at
org.browsermob.proxy.http.BrowserMobHttpClient.execute(BrowserMobHttpClient.java:
381)
The workaround was to delete the file /tmp/usrAgentString.txt so it is
downloaded again.
And the fix is to catch the exception in BrowserMobHttpClient, which
as of now only catches IOExceptions.
I'll send a patch soon.
Hope this helps.
Patrick Lightbody
unread,
Jul 8, 2011, 9:05:49 PM7/8/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to browserm...@googlegroups.com
Wow, very interesting. I just grabbed that user-agent code but never looked closely at it. Probably don't want to rely on external services so heavily like that. Maybe we can just check in a version of that userAgentString.txt file in to the project and update it every release?