summaryrefslogtreecommitdiff
path: root/src/response.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-09-17 19:29:59 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-10-11 12:19:26 -0400
commit869c778aa74e889bf7ab529e63ec88dee7787db9 (patch)
tree17262f13bb21b35aca7cd2ffa3f7b722412045f8 /src/response.h
parent10d9d146336edb34300f1ba6f4e8e5ac10279529 (diff)
downloadlighttpd-git-869c778aa74e889bf7ab529e63ec88dee7787db9.tar.gz
[core] relay 1xx from backend over HTTP/2
relay 1xx from backend over HTTP/2, e.g. 103 Early Hints (if client is connected using HTTP/2) enabled by default unless disabled in lighttpd.conf with: server.feature-flags += ( "server.h2-discard-backend-1xx" = "enable" ) Warning: backends which send 103 Early Hints should check User-Agent before doing so since naive clients might not handle unexpected 1xx. Some clients may take the 1xx response as the final response, expecting only one response. Some clients might not properly handle 100 Continue if the client did not send Expect: 100-continue with the request. https://tools.ietf.org/html/rfc8297#section-3 Security Considerations x-ref: An HTTP Status Code for Indicating Hints (103 Early Hints) https://tools.ietf.org/html/rfc8297
Diffstat (limited to 'src/response.h')
-rw-r--r--src/response.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/response.h b/src/response.h
index 154f8602..d5d30e70 100644
--- a/src/response.h
+++ b/src/response.h
@@ -40,6 +40,11 @@ typedef struct http_response_opts_t {
typedef int (*http_cgi_header_append_cb)(void *vdata, const char *k, size_t klen, const char *v, size_t vlen);
int http_cgi_headers(request_st *r, http_cgi_opts *opts, http_cgi_header_append_cb cb, void *vdata);
+typedef int (*http_response_send_1xx_cb)(request_st *r, connection *con);
+__attribute_cold__
+void http_response_send_1xx_cb_set (http_response_send_1xx_cb fn, int vers);
+int http_response_send_1xx (request_st *r);
+
handler_t http_response_parse_headers(request_st *r, http_response_opts *opts, buffer *hdrs);
handler_t http_response_read(request_st *r, http_response_opts *opts, buffer *b, fdnode *fdn);