Blame SOURCES/esc-1.1.0-fix7.patch

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