# HG changeset patch # User Olaf Wintermann # Date 1772922916 -3600 # Node ID 5ad3bda4aca1f26df05ca8e9c41a581fa0988ef6 # Parent fcd92f022e93183a7f948c3bc03af82137efbe81 fix httpclient using the wrong method diff -r fcd92f022e93 -r 5ad3bda4aca1 src/server/proxy/httpclient.c --- a/src/server/proxy/httpclient.c Sat Mar 07 23:26:02 2026 +0100 +++ b/src/server/proxy/httpclient.c Sat Mar 07 23:35:16 2026 +0100 @@ -275,10 +275,11 @@ return 1; } - if(client->method) { + if(!client->method) { cxBufferPutString(&buf, "GET "); } else { cxBufferPutString(&buf, client->method); + cxBufferPut(&buf, ' '); } cxBufferPutString(&buf, client->uri ? client->uri : "/"); cxBufferPutString(&buf, " HTTP/1.1\r\n"); diff -r fcd92f022e93 -r 5ad3bda4aca1 src/server/safs/proxy.c --- a/src/server/safs/proxy.c Sat Mar 07 23:26:02 2026 +0100 +++ b/src/server/safs/proxy.c Sat Mar 07 23:35:16 2026 +0100 @@ -87,6 +87,9 @@ static void proxy_unref(ProxyRequest *proxy) { if(--proxy->ref == 0) { + //const char *method = pblock_findkeyval(pb_key_method, proxy->rq->reqpb); + //const char *uri = pblock_findkeyval(pb_key_uri, proxy->rq->reqpb); + //log_ereport(LOG_INFORM, "reverse-proxy: %s %s finished", method, uri); http_client_free(proxy->client); free(proxy->read_buf); free(proxy); @@ -316,6 +319,8 @@ const char *uri = pblock_findkeyval(pb_key_uri, rq->reqpb); const char *query = pblock_findkeyval(pb_key_query, rq->reqpb); + //log_ereport(LOG_INFORM, "reverse-proxy: %s %s", method, uri); + char *host_header = pblock_findval("host-header", param); const char *location = pblock_findval("location", param);