Commit 9a6677ff authored by Brian Pane's avatar Brian Pane
Browse files

Faster, simpler code for form_header_field() on ASCII based

platforms


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95049 13f79535-47bb-0310-9956-ffa450edef68
parent f55b544f
Loading
Loading
Loading
Loading
+7 −0
Changes for modules/http/http_protocol.c: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -996,6 +996,7 @@ typedef struct header_struct {
static int form_header_field(header_struct *h,
                             const char *fieldname, const char *fieldval)
{
#if APR_CHARSET_EBCDIC
    char *headfield;
    apr_size_t len;
    apr_size_t name_len;
@@ -1017,6 +1018,12 @@ static int form_header_field(header_struct *h,
    *next = 0;
    ap_xlate_proto_to_ascii(headfield, len);
    apr_brigade_write(h->bb, NULL, NULL, headfield, len);
#else
    apr_brigade_puts(h->bb, NULL, NULL, fieldname);
    apr_brigade_write(h->bb, NULL, NULL, ": ", sizeof(": ") - 1);
    apr_brigade_puts(h->bb, NULL, NULL, fieldval);
    apr_brigade_write(h->bb, NULL, NULL, CRLF, sizeof(CRLF) - 1);
#endif /* APR_CHARSET_EBCDIC */
    return 1;
}