Skip to content

Commit 741b540

Browse files
committed
Merge GH PR #602
mod_http2 source sync to v2.0.38 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1932236 13f79535-47bb-0310-9956-ffa450edef68
1 parent fd8b51a commit 741b540

16 files changed

Lines changed: 63 additions & 35 deletions

File tree

STATUS

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
181181
or https://github.com/apache/httpd/pull/587
182182
+1: jorton, rpluem, covener
183183

184-
*) mod_http2: do full source sync to trunk. A small set of deviations have
185-
crept in over time. Let's do a full sync, making life easier for
186-
maintainers and distros.
187-
2.4.x patch: https://github.com/apache/httpd/pull/602
188-
+1: icing, steffenal, covener
189-
190184
*) mod_http2: update to v2.0.39
191185
https://github.com/apache/httpd/pull/602 should have been applied!
192186
trunk patch: https://svn.apache.org/r1931949

changes-entries/h2_v2.0.38.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*) mod_http2: update to version 2.0.38
2+
Source sync with mod_h2 github repository. No functional change.
3+
[Stefan Eissing]

modules/http2/h2_c1.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@
4747

4848
static struct h2_workers *workers;
4949

50-
static int async_mpm, mpm_can_waitio;
50+
static int async_mpm;
51+
#ifdef AP_MPMQ_CAN_WAITIO
52+
static int mpm_can_waitio;
53+
#endif
5154

5255
APR_OPTIONAL_FN_TYPE(ap_logio_add_bytes_in) *h2_c_logio_add_bytes_in;
5356
APR_OPTIONAL_FN_TYPE(ap_logio_add_bytes_out) *h2_c_logio_add_bytes_out;

modules/http2/h2_c2.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ static apr_status_t h2_c2_filter_out(ap_filter_t* f, apr_bucket_brigade* bb)
370370
h2_conn_ctx_t *conn_ctx = h2_conn_ctx_get(f->c);
371371
apr_status_t rv;
372372

373+
if (bb == NULL) {
374+
#if !AP_MODULE_MAGIC_AT_LEAST(20180720, 1)
375+
f->c->data_in_output_filters = 0;
376+
#endif
377+
return APR_SUCCESS;
378+
}
379+
373380
if (bb == NULL) {
374381
#if !AP_MODULE_MAGIC_AT_LEAST(20180720, 1)
375382
f->c->data_in_output_filters = 0;

modules/http2/h2_c2_filter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static int uniq_field_values(void *d, const char *key, const char *val)
204204
*/
205205
for (i = 0, strpp = (char **) values->elts; i < values->nelts;
206206
++i, ++strpp) {
207-
if (*strpp && apr_strnatcasecmp(*strpp, start) == 0) {
207+
if (*strpp && ap_cstr_casecmp(*strpp, start) == 0) {
208208
break;
209209
}
210210
}
@@ -312,7 +312,7 @@ static h2_headers *create_response(request_rec *r)
312312

313313
while (field && (token = ap_get_list_item(r->pool, &field)) != NULL) {
314314
for (i = 0; i < r->content_languages->nelts; ++i) {
315-
if (!apr_strnatcasecmp(token, languages[i]))
315+
if (!ap_cstr_casecmp(token, languages[i]))
316316
break;
317317
}
318318
if (i == r->content_languages->nelts) {

modules/http2/h2_mplx.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,11 @@ apr_status_t h2_mplx_c1_streams_do(h2_mplx *m, h2_mplx_stream_cb *cb, void *ctx)
398398
{
399399
stream_iter_ctx_t x;
400400

401-
H2_MPLX_ENTER(m);
402-
403401
x.cb = cb;
404402
x.ctx = ctx;
403+
404+
H2_MPLX_ENTER(m);
405+
405406
h2_ihash_iter(m->streams, m_stream_iter_wrap, &x);
406407

407408
H2_MPLX_LEAVE(m);
@@ -1033,7 +1034,8 @@ static void s_c2_done(h2_mplx *m, conn_rec *c2, h2_conn_ctx_t *conn_ctx)
10331034
int i;
10341035

10351036
for (i = 0; i < m->spurge->nelts; ++i) {
1036-
if (stream == APR_ARRAY_IDX(m->spurge, i, h2_stream*)) {
1037+
stream = APR_ARRAY_IDX(m->spurge, i, h2_stream*);
1038+
if (stream && (stream->id == conn_ctx->stream_id)) {
10371039
ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, c2,
10381040
H2_STRM_LOG(APLOGNO(03517), stream, "already in spurge"));
10391041
ap_assert("stream should not be in spurge" == NULL);

modules/http2/h2_proxy_session.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,8 @@ static apr_status_t open_stream(h2_proxy_session *session, const char *url,
866866
* Host: header */
867867
authority = r->server->server_hostname;
868868
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(10511)
869-
"HTTP/0.9 request (with no host line) "
870-
"on incoming request and preserve host set "
869+
"incoming HTTP/0.9 request (with no Host header) "
870+
"and preserve host set, "
871871
"forcing hostname to be %s for uri %s",
872872
authority, r->uri);
873873
apr_table_setn(r->headers_in, "Host", authority);

modules/http2/h2_proxy_util.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ static int iq_bubble_down(h2_proxy_iqueue *q, int i, int bottom,
381381
* h2_proxy_ngheader
382382
******************************************************************************/
383383
#define H2_HD_MATCH_LIT_CS(l, name) \
384-
((strlen(name) == sizeof(l) - 1) && !apr_strnatcasecmp(l, name))
384+
((strlen(name) == sizeof(l) - 1) && !ap_cstr_casecmp(l, name))
385385

386386
static int h2_util_ignore_header(const char *name)
387387
{
@@ -500,7 +500,7 @@ static int ignore_header(const literal *lits, size_t llen,
500500

501501
for (i = 0; i < llen; ++i) {
502502
lit = &lits[i];
503-
if (lit->len == nlen && !apr_strnatcasecmp(lit->name, name)) {
503+
if (lit->len == nlen && !ap_cstr_casecmp(lit->name, name)) {
504504
return 1;
505505
}
506506
}
@@ -542,7 +542,7 @@ void h2_proxy_util_camel_case_header(char *s, size_t len)
542542

543543
/** Match a header value against a string constance, case insensitive */
544544
#define H2_HD_MATCH_LIT(l, name, nlen) \
545-
((nlen == sizeof(l) - 1) && !apr_strnatcasecmp(l, name))
545+
((nlen == sizeof(l) - 1) && !ap_cstr_casecmp(l, name))
546546

547547
static apr_status_t h2_headers_add_h1(apr_table_t *headers, apr_pool_t *pool,
548548
const char *name, size_t nlen,

modules/http2/h2_session.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static h2_stream *h2_session_open_stream(h2_session *session, int stream_id,
125125
apr_allocator_t *allocator;
126126
apr_pool_t *stream_pool;
127127
apr_status_t rv;
128-
128+
129129
rv = apr_allocator_create(&allocator);
130130
if (rv != APR_SUCCESS)
131131
return NULL;
@@ -135,7 +135,7 @@ static h2_stream *h2_session_open_stream(h2_session *session, int stream_id,
135135
apr_allocator_owner_set(allocator, stream_pool);
136136
apr_pool_abort_set(abort_on_oom, stream_pool);
137137
apr_pool_tag(stream_pool, "h2_stream");
138-
138+
139139
stream = h2_stream_create(stream_id, stream_pool, session,
140140
session->monitor, initiated_on);
141141
if (stream) {

modules/http2/h2_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ apr_size_t h2_util_table_bytes(apr_table_t *t, apr_size_t pair_extra);
337337

338338
/** Match a header value against a string constance, case insensitive */
339339
#define H2_HD_MATCH_LIT(l, name, nlen) \
340-
((nlen == sizeof(l) - 1) && !apr_strnatcasecmp(l, name))
340+
((nlen == sizeof(l) - 1) && !ap_cstr_casecmp(l, name))
341341

342342
/*******************************************************************************
343343
* HTTP/2 header helpers

0 commit comments

Comments
 (0)