| 193 | } |
| 194 | |
| 195 | h2_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 | |
| 214 | int h2_headers_are_final_response(h2_headers *headers) |
| 215 | { |
nothing calls this directly
no test coverage detected