1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
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);
|