paivana

HTTP paywall reverse proxy
Log | Files | Refs | Submodules | README | LICENSE

commit 6f0c011e79b2f9ac9320c1be9c2feb665be2df81
parent 385df4ed691b0f877a681c290d02329e7306513b
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 26 Apr 2026 21:07:41 +0200

fix 100 continue handling

Diffstat:
Msrc/backend/paivana-httpd_daemon.c | 26++++++++++++--------------
Msrc/backend/paivana-httpd_reverse.c | 1-
Msrc/backend/paivana-httpd_templates.c | 3++-
3 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/src/backend/paivana-httpd_daemon.c b/src/backend/paivana-httpd_daemon.c @@ -142,18 +142,7 @@ create_response (void *cls, } if (rc->do_forward) - { - if (NULL == rc->hr) - rc->hr = PAIVANA_HTTPD_reverse_create (rc->connection, - rc->url); - return PAIVANA_HTTPD_reverse (rc->hr, - con, - url, - meth, - ver, - upload_data, - upload_data_size); - } + goto do_forward; if (! PAIVANA_HTTPD_get_base_url (con, &buf)) @@ -205,8 +194,17 @@ create_response (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Request OK, no paywall applies!\n"); rc->do_forward = true; - /* FIXME: code for 100 continue suppression should go here! */ - return MHD_YES; +do_forward: + if (NULL == rc->hr) + rc->hr = PAIVANA_HTTPD_reverse_create (rc->connection, + rc->url); + return PAIVANA_HTTPD_reverse (rc->hr, + con, + url, + meth, + ver, + upload_data, + upload_data_size); } diff --git a/src/backend/paivana-httpd_reverse.c b/src/backend/paivana-httpd_reverse.c @@ -1673,7 +1673,6 @@ start_curl_request (struct HttpRequest *hr, GNUNET_break (0); curl_easy_cleanup (hr->curl); hr->curl = NULL; - // FIXME: body is not perfect here... return MHD_queue_response (con, MHD_HTTP_BAD_GATEWAY, curl_failure_response); diff --git a/src/backend/paivana-httpd_templates.c b/src/backend/paivana-httpd_templates.c @@ -242,7 +242,8 @@ load_paywall (struct MHD_Connection *conn, MHD_add_response_header (reply, MHD_HTTP_HEADER_CONTENT_TYPE, "text/html")); - // FIXME: set Vary and other cache control headers! + // FIXME: set Vary and other cache control headers on the static + // Paywall page! { struct ResponseCacheEntry *rce;