]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Allow empty headers in mod_proxy. See below:
authorChuck Murcko <chuck@apache.org>
Fri, 16 Mar 2001 07:01:23 +0000 (07:01 +0000)
committerChuck Murcko <chuck@apache.org>
Fri, 16 Mar 2001 07:01:23 +0000 (07:01 +0000)
Empty headers are allowed by RFC2068 section 4.2.  The presence or
absence of an empty header can be significant.  The current mod_proxy
of httpd 1.3.x removes empty headers. Change mod_proxy to preserve
empty headers.
Submitted by: Christian von Roques <roques@mti.ag>
Reviewed by: Graham Leggett, Chuck Murcko

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@88526 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/modules/proxy/proxy_util.c

index 5783cc783767c62126f588a337552d82741eecea..a175307a6f948ab19f522e55d313bac904753fc5 100644 (file)
@@ -1,5 +1,10 @@
 Changes with Apache 1.3.20
 
+  *) Empty headers are allowed by RFC2068 section 4.2.  The presence or
+     absence of an empty header can be significant.  The current mod_proxy
+     of httpd 1.3.x removes empty headers. Change mod_proxy to preserve
+     empty headers. [Christian von Roques <roques@mti.ag>]
+
   *) Enhance rotatelogs so that a UTC offset can be specified, and
      the logfile name can be formatted using strftime(3).  [Ken Coar]
 
index 728c93c8401f09c3572e3b83f6072960bc699e84..d2086002dc66cd92afbcd0c73c0f5133c6a68338 100644 (file)
@@ -1267,8 +1267,10 @@ int ap_proxy_send_hdr_line(void *p, const char *key, const char *value)
 {
     struct tbl_do_args *parm = (struct tbl_do_args *)p;
 
-    if (key == NULL || value == NULL || value[0] == '\0')
+    if (key == NULL)
        return 1;
+    if (value == NULL)
+       value = "";
     if (!parm->req->assbackwards)
        ap_rvputs(parm->req, key, ": ", value, CRLF, NULL);
     if (parm->cache != NULL && parm->cache->fp != NULL &&