Skip to content

Commit

Permalink
SAK-32698 - Add user-agent to HEAD request (sakaiproject#4600)
Browse files Browse the repository at this point in the history
  • Loading branch information
csev authored Jul 13, 2017
1 parent d0addec commit d97b5e8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,9 @@ public boolean popupXFrame(RenderRequest request, Placement placement, String ur
(HttpURLConnection) new URL(url).openConnection();
con.setRequestMethod("HEAD");

String sakaiVersion = ServerConfigurationService.getString("version.sakai", "?");
con.setRequestProperty("User-Agent","Java Sakai/"+sakaiVersion);

Map headerfields = con.getHeaderFields();
Set headers = headerfields.entrySet();
for(Iterator i = headers.iterator(); i.hasNext();) {
Expand Down

0 comments on commit d97b5e8

Please sign in to comment.