Dear Aperture Developers,

I was just running the (excellent -- awesome job!) Web crawler supplied with Aperture.  I thought users might want to be able to specify the value it sends to the server for User-Agent.  I altered the HttpAccessor class (see below) to allow this, and thought it might be useful to others.  Here's a patch in case anyone is interested.  The result is that the user could specify this value on the command line like this:

  java -Dhttp.user.agent="My Web Crawler, v 0.0.1" ... \



Index: core/src/main/java/org/semanticdesktop/aperture/accessor/http/
--- core/src/main/java/org/semanticdesktop/aperture/accessor/http/ (revision 2458)
+++ core/src/main/java/org/semanticdesktop/aperture/accessor/http/ (working copy)
@@ -143,7 +143,10 @@
  try {
  // set up a connection (a HttpAccessor always has HttpURLConnections, else it's a bug)
  connection = createConnection(url, ifModifiedSince);
+        String userAgent = System.getProperty("http.user.agent");
+        if (null != userAgent && userAgent.length() > 0) {
+          connection.setRequestProperty("User-Agent", userAgent);
+        }
  // send the request to the server