summaryrefslogtreecommitdiff
path: root/modules/http2/h2_response.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2016-07-05 23:20:42 +0200
committerStefan Fritsch <sf@sfritsch.de>2016-07-05 23:20:42 +0200
commitd5ffc4eb85d71c901c85119cf873e343349e97e2 (patch)
tree564636012ef7538ed4d7096b83c994dbda76c9db /modules/http2/h2_response.c
parent48eddd3d39fa2668ee29198ebfb33c41d4738c21 (diff)
downloadapache2-upstream.tar.gz
Imported Upstream version 2.4.23upstream
Diffstat (limited to 'modules/http2/h2_response.c')
-rw-r--r--modules/http2/h2_response.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/http2/h2_response.c b/modules/http2/h2_response.c
index eb9043d0..4cafd355 100644
--- a/modules/http2/h2_response.c
+++ b/modules/http2/h2_response.c
@@ -171,13 +171,14 @@ h2_response *h2_response_die(int stream_id, apr_status_t type,
{
apr_table_t *headers = apr_table_make(pool, 5);
char *date = NULL;
+ int status = (type >= 200 && type < 600)? type : 500;
date = apr_palloc(pool, APR_RFC822_DATE_LEN);
ap_recent_rfc822_date(date, req->request_time);
apr_table_setn(headers, "Date", date);
apr_table_setn(headers, "Server", ap_get_server_banner());
- return h2_response_create_int(stream_id, 0, 500, headers, NULL, pool);
+ return h2_response_create_int(stream_id, 0, status, headers, NULL, pool);
}
h2_response *h2_response_clone(apr_pool_t *pool, h2_response *from)