src/server/proxy/httpclient.c

changeset 726
5ad3bda4aca1
parent 722
12fb6b33418c
equal deleted inserted replaced
725:fcd92f022e93 726:5ad3bda4aca1
273 CxBuffer buf; 273 CxBuffer buf;
274 if(cxBufferInit(&buf, cxDefaultAllocator, NULL, HTTP_CLIENT_BUFFER_SIZE, CX_BUFFER_AUTO_EXTEND)) { 274 if(cxBufferInit(&buf, cxDefaultAllocator, NULL, HTTP_CLIENT_BUFFER_SIZE, CX_BUFFER_AUTO_EXTEND)) {
275 return 1; 275 return 1;
276 } 276 }
277 277
278 if(client->method) { 278 if(!client->method) {
279 cxBufferPutString(&buf, "GET "); 279 cxBufferPutString(&buf, "GET ");
280 } else { 280 } else {
281 cxBufferPutString(&buf, client->method); 281 cxBufferPutString(&buf, client->method);
282 cxBufferPut(&buf, ' ');
282 } 283 }
283 cxBufferPutString(&buf, client->uri ? client->uri : "/"); 284 cxBufferPutString(&buf, client->uri ? client->uri : "/");
284 cxBufferPutString(&buf, " HTTP/1.1\r\n"); 285 cxBufferPutString(&buf, " HTTP/1.1\r\n");
285 286
286 HeaderArray *hdr = client->request_headers; 287 HeaderArray *hdr = client->request_headers;

mercurial