1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

*) core: add ap_h1_append_header() for single header values.

*) mod_proxy: use of new ap_h1_header(s) functions for
     formatting HTTP/1.1 requests.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Eissing
2022-04-04 09:41:25 +00:00
parent 4442201e61
commit cc232ba454
5 changed files with 121 additions and 121 deletions

View File

@@ -1485,8 +1485,22 @@ AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l)
l->method_list->nelts = 0;
}
/* Send a request's HTTP response headers to the client.
*/
AP_DECLARE(apr_status_t) ap_h1_append_header(apr_bucket_brigade *b,
apr_pool_t *p,
const char *name, const char *value)
{
char *buf;
apr_size_t len;
if (!name || !*name || !value || !*value) {
return APR_SUCCESS;
}
buf = apr_pstrcat(p, name, ": ", value, CRLF, NULL);
len = strlen(buf);
ap_xlate_proto_to_ascii(buf, len);
return apr_brigade_write(b, NULL, NULL, buf, len);
}
AP_DECLARE(apr_status_t) ap_h1_append_headers(apr_bucket_brigade *bb,
request_rec *r,
apr_table_t *headers)