Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 817597832775538bcab10ef7d87874f7 > files > 1

libghttp-1.0.9-9mdv2008.0.src.rpm

Index: gnome-http/http_req.c
diff -u gnome-http/http_req.c:1.24 gnome-http/http_req.c:1.25
--- gnome-http/http_req.c:1.24	Sat Dec  2 13:45:35 2000
+++ gnome-http/http_req.c	Sat May 12 16:35:46 2001
@@ -108,6 +108,7 @@
   int         l_headers_len = 0;
   int         l_rv = 0;
   char       *l_content = NULL;
+  int         l_ver_major, l_ver_minor;
 
   /* see if we need to jump into the function somewhere */
   if (a_conn->sync == HTTP_TRANS_ASYNC)
@@ -125,21 +126,25 @@
   memset(l_request, 0, 30 + strlen(a_req->resource) + (a_conn->proxy_host ?
 						       (strlen(a_req->host) + 20) : 0));
   /* copy it into the buffer */
+  l_ver_major = (int)a_req->http_ver;
+  l_ver_minor = ((int)(a_req->http_ver*10.0)) % 10;
   if (a_conn->proxy_host)
     {
       l_request_len = sprintf(l_request,
-			      "%s %s HTTP/%01.1f\r\n",
+			      "%s %s HTTP/%d.%d\r\n",
 			      http_req_type_char[a_req->type],
 			      a_req->full_uri,
-			      a_req->http_ver);
+			      l_ver_major,
+                              l_ver_minor);
     }
   else
     {
       l_request_len = sprintf(l_request,
-			      "%s %s HTTP/%01.1f\r\n",
+			      "%s %s HTTP/%d.%d\r\n",
 			      http_req_type_char[a_req->type],
 			      a_req->resource,
-			      a_req->http_ver);
+                              l_ver_major,
+                              l_ver_minor);
     }
   /* set the request in the connection buffer */
   http_trans_append_data_to_buf(a_conn, l_request, l_request_len);