summaryrefslogtreecommitdiff
path: root/src/response.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-04-02 02:52:34 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:33 -0400
commitfd7dc2997d560568053719e14cf3a718c4d0f254 (patch)
tree948c1871e69416051d00da3168127be3000aaca2 /src/response.h
parentbbf365a80a5486c6b713d6ba91fca249ef8a1dab (diff)
downloadlighttpd-git-fd7dc2997d560568053719e14cf3a718c4d0f254.tar.gz
[core] http_dispatch[] tables for HTTP proto vers
Diffstat (limited to 'src/response.h')
-rw-r--r--src/response.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/response.h b/src/response.h
index d1fb2467..438ca8fc 100644
--- a/src/response.h
+++ b/src/response.h
@@ -11,6 +11,21 @@
struct stat_cache_entry;/* declaration */
struct chunkqueue; /* declaration */
+struct http_dispatch {
+ int (*process_streams) (connection *,
+ handler_t(*http_response_handler)(request_st *),
+ int(*)(request_st *, connection *));
+ void (*upgrade_h2) (request_st *, connection *);
+ void (*upgrade_h2c) (request_st *, connection *);
+ int (*send_100_continue)(request_st *, connection *);
+ int (*send_1xx) (request_st *, connection *);
+ int (*check_timeout) (connection *, unix_time64_t);
+ int (*goaway_graceful) (connection *); /* graceful restart/shutdown */
+};
+
+/* http_dispatch is in http-header-glue.c to be defined in shared object */
+extern struct http_dispatch http_dispatch[4]; /*(index by http_version_t)*/
+
int http_response_parse(server *srv, request_st *r);
enum {
@@ -35,9 +50,6 @@ typedef struct http_response_opts_t {
handler_t(*headers)(request_st *, struct http_response_opts_t *);
} http_response_opts;
-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);