Added option to set http User-Agent header in getURL().

This commit is contained in:
hns 2003-03-11 12:53:22 +00:00
parent 0879e2e1ff
commit a0950e35a0

View file

@ -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 ();