Lines 2176-2182
static int send_header(void *data, const char *key
Link Here
|
2176 |
AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers) |
2176 |
AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers) |
2177 |
{ |
2177 |
{ |
2178 |
hdr_ptr x; |
2178 |
hdr_ptr x; |
2179 |
char *status_line = NULL; |
2179 |
char *response_line = NULL; |
|
|
2180 |
const char *status_line; |
2180 |
request_rec *rr; |
2181 |
request_rec *rr; |
2181 |
|
2182 |
|
2182 |
if (r->proto_num < HTTP_VERSION(1,1)) { |
2183 |
if (r->proto_num < HTTP_VERSION(1,1)) { |
Lines 2207-2219
AP_DECLARE(void) ap_send_interim_response(request_
Link Here
|
2207 |
} |
2208 |
} |
2208 |
} |
2209 |
} |
2209 |
|
2210 |
|
2210 |
status_line = apr_pstrcat(r->pool, AP_SERVER_PROTOCOL, " ", r->status_line, CRLF, NULL); |
2211 |
status_line = r->status_line; |
2211 |
ap_xlate_proto_to_ascii(status_line, strlen(status_line)); |
2212 |
if (status_line == NULL) { |
|
|
2213 |
status_line = ap_get_status_line_ex(r->pool, r->status); |
2214 |
} |
2215 |
response_line = apr_pstrcat(r->pool, |
2216 |
AP_SERVER_PROTOCOL " ", status_line, CRLF, |
2217 |
NULL); |
2218 |
ap_xlate_proto_to_ascii(response_line, strlen(response_line)); |
2212 |
|
2219 |
|
2213 |
x.f = r->connection->output_filters; |
2220 |
x.f = r->connection->output_filters; |
2214 |
x.bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); |
2221 |
x.bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); |
2215 |
|
2222 |
|
2216 |
ap_fputs(x.f, x.bb, status_line); |
2223 |
ap_fputs(x.f, x.bb, response_line); |
2217 |
if (send_headers) { |
2224 |
if (send_headers) { |
2218 |
apr_table_do(send_header, &x, r->headers_out, NULL); |
2225 |
apr_table_do(send_header, &x, r->headers_out, NULL); |
2219 |
apr_table_clear(r->headers_out); |
2226 |
apr_table_clear(r->headers_out); |