]> granicus.if.org Git - apache/commitdiff
Faster, simpler code for form_header_field() on ASCII based
authorBrian Pane <brianp@apache.org>
Sun, 12 May 2002 21:50:46 +0000 (21:50 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 12 May 2002 21:50:46 +0000 (21:50 +0000)
platforms

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95049 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c

index cd56ea46cc0f4cc69a08eddfc080d9d0acd377ab..d8799fdbd61c2943aab0d489a4fbb50e5fb71d9f 100644 (file)
@@ -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;
 }