W3C home > Mailing lists > Public > www-validator-cvs@w3.org > December 2010

unicorn commit: + Unicorn user-agent

From: Mercurial notifier <nobody@w3.org>
Date: Wed, 08 Dec 2010 17:36:50 +0000
Message-Id: <E1PQNwg-0007HW-6B@mcbain.w3.org>
To: Unicorn Updates <www-validator-cvs@w3.org>
changeset:   1585:51ba8f2cef75
parent:      1568:d8be99f9906c
user:        Thomas Gambet <tgambet@w3.org>
date:        Wed Dec 08 12:34:18 2010 -0500
files:       src/org/w3c/unicorn/input/URIInputParameter.java
description:
+ Unicorn user-agent


diff -r d8be99f9906c -r 51ba8f2cef75 src/org/w3c/unicorn/input/URIInputParameter.java
--- a/src/org/w3c/unicorn/input/URIInputParameter.java	Tue Nov 23 13:47:04 2010 -0500
+++ b/src/org/w3c/unicorn/input/URIInputParameter.java	Wed Dec 08 12:34:18 2010 -0500
@@ -101,6 +101,7 @@
 			}
 			
 			HttpURLConnection con = (HttpURLConnection) docUrl.openConnection();
+			con.setRequestProperty("User-agent", "Unicorn/1.0");
 			con.setConnectTimeout(connectTimeOut);
 			con.setRequestMethod("HEAD");
 			try {
@@ -115,6 +116,8 @@
 			int responseCode = con.getResponseCode();
 			if (responseCode == 405) {
 				con = (HttpURLConnection) docUrl.openConnection();
+				con.setRequestProperty("User-agent", "Unicorn/1.0");
+				con.setConnectTimeout(connectTimeOut);
 				con.setRequestMethod("GET");
 				con.connect();
 				responseCode = con.getResponseCode();
Received on Wednesday, 8 December 2010 17:36:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:44 UTC