Blame SOURCES/esc-1.1.0-fix7.patch

f35d1b
--- ./esc/src/lib/NssHttpClient/httpClientNss.cpp.fix7	2009-06-22 13:00:20.000000000 -0700
f35d1b
+++ ./esc/src/lib/NssHttpClient/httpClientNss.cpp	2009-06-22 13:05:07.000000000 -0700
f35d1b
@@ -64,8 +64,53 @@
f35d1b
 
f35d1b
 PSHttpResponse *HttpClientNss::httpSendChunked(char *host_port, char *uri, char *method, char *body,PSChunkedResponseCallback cb,void *uw,PRBool doSSL,int messageTimeout )
f35d1b
 {
f35d1b
-    
f35d1b
-    PSHttpServer server(host_port, PR_AF_INET);
f35d1b
+    char *pPort = NULL;
f35d1b
+    char *pPortActual = NULL;
f35d1b
+
f35d1b
+    char hostName[512];
f35d1b
+
f35d1b
+    /*
f35d1b
+     * Isolate the host name, account for IPV6 numeric addresses.
f35d1b
+     *
f35d1b
+     */
f35d1b
+
f35d1b
+    if(host_port)
f35d1b
+        strncpy(hostName,host_port,512);
f35d1b
+
f35d1b
+    pPort = hostName;
f35d1b
+    while(1)  {
f35d1b
+        pPort = strchr(pPort, ':');
f35d1b
+        if (pPort) {
f35d1b
+            pPortActual = pPort;
f35d1b
+            pPort++;
f35d1b
+        } else
f35d1b
+            break;
f35d1b
+    }
f35d1b
+
f35d1b
+    if(pPortActual)
f35d1b
+        *pPortActual = '\0';
f35d1b
+
f35d1b
+    /*
f35d1b
+    *  Rifle through the values for the host
f35d1b
+    */
f35d1b
+
f35d1b
+    PRAddrInfo *ai;
f35d1b
+    void *iter;
f35d1b
+    PRNetAddr addr;
f35d1b
+    int family = PR_AF_INET;
f35d1b
+
f35d1b
+    ai = PR_GetAddrInfoByName(hostName, PR_AF_UNSPEC, PR_AI_ADDRCONFIG);
f35d1b
+    if (ai) {
f35d1b
+        printf("%s\n", PR_GetCanonNameFromAddrInfo(ai));
f35d1b
+        iter = NULL;
f35d1b
+        while ((iter = PR_EnumerateAddrInfo(iter, ai, 0, &addr)) != NULL) {
f35d1b
+            family = PR_NetAddrFamily(&addr);
f35d1b
+            break;
f35d1b
+        }
f35d1b
+        PR_FreeAddrInfo(ai);
f35d1b
+    }
f35d1b
+
f35d1b
+    PSHttpServer server(host_port, family);
f35d1b
  
f35d1b
     PSHttpRequest request( &server, uri, HTTP11, 0 );
f35d1b
     _request = &request;
f35d1b
--- ./esc/src/app/xul/esc/application.ini.fix7	2009-06-22 15:34:32.000000000 -0700
f35d1b
+++ ./esc/src/app/xul/esc/application.ini	2009-06-22 15:35:11.000000000 -0700
f35d1b
@@ -25,7 +25,7 @@
f35d1b
 Name=ESC
f35d1b
 ;
f35d1b
 ; This field specifies your application's version.  This field is optional.
f35d1b
-Version=1.1.0-7
f35d1b
+Version=1.1.0-9
f35d1b
 ;
f35d1b
 ; This field specifies your application's build ID (timestamp).  This field is
f35d1b
 ; required.