summaryrefslogtreecommitdiffstats
path: root/modules/http2/h2_request.c
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2021-10-12 15:34:01 +0200
committerStefan Eissing <icing@apache.org>2021-10-12 15:34:01 +0200
commit6a355db082d07a2b71a372e328cfda8fc7d27907 (patch)
treea476e628e10d09f3c2edfdd96c423465f5f661fa /modules/http2/h2_request.c
parenttaking numbers for modules/http2 changes (diff)
downloadapache2-6a355db082d07a2b71a372e328cfda8fc7d27907.tar.xz
apache2-6a355db082d07a2b71a372e328cfda8fc7d27907.zip
*) mod_http2:
- Fixed an issue since 1.15.24 that "Server" headers in proxied requests were overwritten instead of preserved. [PR by @daum3ns] - Added directove 'H2StreamTimeout' to configure a separate value for HTTP/2 streams, overriding server's 'Timeout' configuration. [rpluem] - HTTP/2 connections now use pollsets to monitor the status of the ongoing streams and their main connection when host OS allows this. - Removed work-arounds for older versions of libnghttp2 and checking during configure that at least version 1.15.0 is present. - The HTTP/2 connection state handler, based on an experiment and draft at the IETF http working group (abandoned for some time), has been removed. - H2SerializeHeaders no longer has an effect. A warning is logged when it is set to "on". The switch enabled the internal writing of requests to be parsed by the internal HTTP/1.1 protocol handler and was introduced to avoid potential incompatibilities during the introduction of HTTP/2. - Removed the abort/redo of tasks when mood swings lower the active limit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894163 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http2/h2_request.c')
-rw-r--r--modules/http2/h2_request.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/modules/http2/h2_request.c b/modules/http2/h2_request.c
index 7c4fb95ea4..7c9f38a26a 100644
--- a/modules/http2/h2_request.c
+++ b/modules/http2/h2_request.c
@@ -38,6 +38,22 @@
#include "h2_util.h"
+h2_request *h2_request_create(int id, apr_pool_t *pool, const char *method,
+ const char *scheme, const char *authority,
+ const char *path, apr_table_t *header)
+{
+ h2_request *req = apr_pcalloc(pool, sizeof(h2_request));
+
+ req->method = method;
+ req->scheme = scheme;
+ req->authority = authority;
+ req->path = path;
+ req->headers = header? header : apr_table_make(pool, 10);
+ req->request_time = apr_time_now();
+
+ return req;
+}
+
typedef struct {
apr_table_t *headers;
apr_pool_t *pool;
@@ -85,9 +101,6 @@ apr_status_t h2_request_rcreate(h2_request **preq, apr_pool_t *pool,
req->path = path;
req->headers = apr_table_make(pool, 10);
req->http_status = H2_HTTP_STATUS_UNSET;
- if (r->server) {
- req->serialize = h2_config_rgeti(r, H2_CONF_SER_HEADERS);
- }
x.pool = pool;
x.headers = req->headers;
@@ -195,7 +208,7 @@ apr_status_t h2_request_end_headers(h2_request *req, apr_pool_t *pool, int eos,
}
}
req->raw_bytes += raw_bytes;
-
+
return APR_SUCCESS;
}
@@ -267,7 +280,7 @@ static request_rec *my_ap_create_request(conn_rec *c)
}
#endif
-request_rec *h2_request_create_rec(const h2_request *req, conn_rec *c)
+request_rec *h2_create_request_rec(const h2_request *req, conn_rec *c)
{
int access_status = HTTP_OK;