incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ak...@apache.org
Subject svn commit: r737928 - /incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java
Date Mon, 26 Jan 2009 23:10:52 GMT
Author: akara
Date: Mon Jan 26 23:10:51 2009
New Revision: 737928

URL: http://svn.apache.org/viewvc?rev=737928&view=rev
Log:
Fix for issue OLIO-44: Default port to 80 if not specified in host:port pair, i.e. only host
specified.

Modified:
    incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java

Modified: incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java
URL: http://svn.apache.org/viewvc/incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java?rev=737928&r1=737927&r2=737928&view=diff
==============================================================================
--- incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java (original)
+++ incubator/olio/workload/php/trunk/src/com/sun/web20/driver/UIDriver.java Mon Jan 26 23:10:51
2009
@@ -306,7 +306,11 @@
                             ctx.getClientsInDriver(), hostPortList.size());
         NameValuePair<Integer> hostPort = hostPortList.get(bucket);
 
-        baseURL = "http://" + hostPort.name + ':' + hostPort.value;
+        if (hostPort.value == null)
+            baseURL = "http://" + hostPort.name;
+        else
+            baseURL = "http://" + hostPort.name + ':' + hostPort.value;
+
         personDetailURL = baseURL + "/users." + type + "?username=";
         tagSearchURL = baseURL + "/taggedEvents." + type;
         tagCloudURL = baseURL + "/taggedEvents." + type;
@@ -329,7 +333,11 @@
         addPersonStatics = populateList(ADDPERSON_STATICS);
         addEventStatics = populateList(ADDEVENT_STATICS);
 
-        loginHeaders.put("Host", hostPort.name + ':' + hostPort.value);
+        if (hostPort.value == null)
+            loginHeaders.put("Host", hostPort.name);
+        else
+            loginHeaders.put("Host", hostPort.name + ':' + hostPort.value);
+
         loginHeaders.put("User-Agent", "Mozilla/5.0");
         loginHeaders.put("Accept", "text/xml.application/xml,application/" +
                 "xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;" +
@@ -572,7 +580,7 @@
     public void doEventDetail() throws IOException {
         //select random event
         logger.finer("doEventDetail");
-        http.fetchURL(eventDetailURL + selectedEvent);
+            http.fetchURL(eventDetailURL + selectedEvent);
         StringBuilder responseBuffer = http.getResponseBuffer();
         if (responseBuffer.length() == 0)
             throw new IOException("Received empty response");



Mime
View raw message