MCPcopy Create free account
hub / github.com/apache/httpd / h2_headers_die

Function h2_headers_die

modules/http2/h2_headers.c:195–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195h2_headers *h2_headers_die(apr_status_t type,
196 const h2_request *req, apr_pool_t *pool)
197{
198 h2_headers *headers;
199 char *date;
200
201 headers = apr_pcalloc(pool, sizeof(h2_headers));
202 headers->status = (type >= 200 && type < 600)? type : 500;
203 headers->headers = apr_table_make(pool, 5);
204 headers->notes = apr_table_make(pool, 5);
205
206 date = apr_palloc(pool, APR_RFC822_DATE_LEN);
207 ap_recent_rfc822_date(date, req? req->request_time : apr_time_now());
208 apr_table_setn(headers->headers, "Date", date);
209 apr_table_setn(headers->headers, "Server", ap_get_server_banner());
210
211 return headers;
212}
213
214int h2_headers_are_final_response(h2_headers *headers)
215{

Callers

nothing calls this directly

Calls 2

ap_recent_rfc822_dateFunction · 0.85
ap_get_server_bannerFunction · 0.85

Tested by

no test coverage detected