Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
libghttp
libghttp-1.0.9-version_float.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libghttp-1.0.9-version_float.diff of Package libghttp
--- ChangeLog +++ ChangeLog @@ -1,3 +1,12 @@ +2002-12-10 Philipp Thomas <pthomas@suse.de> + + * http_req.h (http_req_tag): Make http_ver a char *. + * http_req.c (http_req_new, http_req_send): Handle + http_ver as string to get rid of locale dependency. + * http_resp.h (http_resp_tag): Make http_ver a string. + * http_resp.c (http_resp_read_headers): Handle http_ver + accordingly. + 2001-01-17 Robey Pointer <robey@eazel.com> reviewed by: J Shane Culpepper <pepper@eazel.com> --- http_req.c +++ http_req.c @@ -53,7 +53,7 @@ l_return = (http_req *)malloc(sizeof(http_req)); memset(l_return, 0, sizeof(http_req)); /* default to 1.1 */ - l_return->http_ver = 1.1; + l_return->http_ver = "1.1"; l_return->headers = http_hdr_list_new(); return l_return; } @@ -128,7 +128,7 @@ if (a_conn->proxy_host) { l_request_len = sprintf(l_request, - "%s %s HTTP/%01.1f\r\n", + "%s %s HTTP/%s\r\n", http_req_type_char[a_req->type], a_req->full_uri, a_req->http_ver); @@ -136,7 +136,7 @@ else { l_request_len = sprintf(l_request, - "%s %s HTTP/%01.1f\r\n", + "%s %s HTTP/%s\r\n", http_req_type_char[a_req->type], a_req->resource, a_req->http_ver); --- http_req.h +++ http_req.h @@ -59,7 +59,7 @@ typedef struct http_req_tag { http_req_type type; - float http_ver; + char *http_ver; char *host; char *full_uri; char *resource; --- http_resp.c +++ http_resp.c @@ -165,8 +165,8 @@ goto ec; } /* convert char into int */ - a_resp->http_ver = (l_ptr[5] - 0x30); - a_resp->http_ver += ((l_ptr[7] - 0x30) / 10.0); + memcpy(a_resp->http_ver, l_ptr+5, 3); + a_resp->http_ver[3] = '\0'; /* convert the response into an int */ a_resp->status_code = ((l_ptr[9] - 0x30)*100); a_resp->status_code += ((l_ptr[10] - 0x30)*10); --- http_resp.h +++ http_resp.h @@ -50,7 +50,7 @@ typedef struct http_resp_tag { - float http_ver; + char http_ver[4]; int status_code; char *reason_phrase; http_hdr_list *headers;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor