Added option to set http User-Agent header in getURL().
This commit is contained in:
parent
0879e2e1ff
commit
a0950e35a0
1 changed files with 3 additions and 0 deletions
|
@ -590,6 +590,9 @@ public final class HopExtension {
|
|||
con.setRequestProperty ("If-None-Match", arguments[1].toString());
|
||||
}
|
||||
}
|
||||
String httpUserAgent = app.getProperty ("httpUserAgent");
|
||||
if (httpUserAgent != null)
|
||||
con.setRequestProperty ("User-Agent", httpUserAgent);
|
||||
con.setAllowUserInteraction(false);
|
||||
String filename = url.getFile ();
|
||||
String contentType = con.getContentType ();
|
||||
|
|
Loading…
Add table
Reference in a new issue