forked from webmetrics/browsermob-proxy
-
Notifications
You must be signed in to change notification settings - Fork 671
Closed
Labels
Milestone
Description
Hi all,
I use browsermob to listen the requests sent by a video player within a browser.
I have a particular check where I assert a domain is well called.
HarEntry currentEntry = ...
String domain = "mydomain.fr";
String currentUrl = currentEntry.getRequest().getUrl();
mydomain.equals(new URI(currentUrl).getHost());It works fine for almost my test, but it failed for one.
After investigation, it appears that currentEntry.getRequest().getUrl() returned http://mydomain.frhttp://mydomain.fr/dt?tv={c:45,d=45}
As you can see the domain is duplicate. This wrong URL is made here:
net.lightbody.bmp.filters.HttpsAwareFiltersAdapter#getFullUrl
net.lightbody.bmp.util.BrowserMobHttpUtil#getHostAndPortFromRequest
There is a URISyntaxException due to the curly brace. And as said the comment
could not parse the URI, so fall through and return the URI as-is
I know curly brace is not a valid char, but would be possible to handle such case? For instance, instead of do nothing try to encode URL.
Thanks