You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2015/07/24 11:16:50 UTC

[Bug 58177] New: Mod Proxy does forward trailers in http chunked request to backends

https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

            Bug ID: 58177
           Summary: Mod Proxy does forward trailers in http chunked
                    request to backends
           Product: Apache httpd-2
           Version: 2.4.12
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
          Assignee: bugs@httpd.apache.org
          Reporter: sachin.shetty@gmail.com

As per http spec, we want clients to send us trailers in chunked requests.
However the request on the server side does not get the trailer at all.

This can be reproduced with Apache 2.4.16 and mod proxy

Request:
<<<<<
telnet somehost 80
POST /some-path HTTP/1.1
Authorization: Basic XXXX=
Host: somehost.domain.com
Transfer-Encoding: chunked
Trailer: My-Test-Trailer

50
11111111111111111111111111111111111111111111111111111111111111111111111111111111
0
My-Test-Trailer: some-value-new
>>>>>> 

Mod proxy is forwarding the request to apache tomcat in our case and it does
not forward the trailers. We have verified that tomcat does get the trailers
when the same request is sent to tomcat directly, so mod proxy is blocking them
out.


Apparently mod proxy never uses the trailers stored in the request/response
trailers as per the discussion in the user group:
http://www.gossamer-threads.com/lists/apache/users/448909

This is very critical to us and blocking a feature rollout, I can help testing
a patch if available.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Daneel Yaitskov <rt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rtfm.rtfm.rtfm@gmail.com

--- Comment #3 from Daneel Yaitskov <rt...@gmail.com> ---
Created attachment 33203
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33203&action=edit
HTTP Trailer patch for 2.4.16

Enforces chunked encoding if trailers are presented.
Checks and filters trailer headers which are declared in the Trailer header.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

--- Comment #4 from Daneel Yaitskov <rt...@gmail.com> ---
Created attachment 33204
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33204&action=edit
script sending test chunked request with a trailer

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Daneel Yaitskov <rt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33239|0                           |1
        is obsolete|                            |

--- Comment #8 from Daneel Yaitskov <rt...@gmail.com> ---
Created attachment 33249
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33249&action=edit
proxy client trailers for 2.4.17

Changes after the review:

1. Split trailer list by tab, comma and space.
2. Replace apr_bucket_immortal_create with apr_bucket_pool_create for trailing
headers.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Daneel Yaitskov <rt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.4.12                      |2.4.16

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

--- Comment #5 from Daneel Yaitskov <rt...@gmail.com> ---
Created attachment 33205
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33205&action=edit
HTTP Trailer patch for trunk (2.5)

I wasn't able to test this because I was stumbled with configure script
generation.

So I tested only patch for 2.4.16.

The patch forward trailing headers in a request passing only those which names
are predefined in the Trailer header.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

--- Comment #2 from Sachin Shetty <sa...@gmail.com> ---
Hi,

This is a crucial fix for us, if anybody can provide us with a patch, we can
test it out. I can even work with my management and try to fund the patch
development if possible.

Thanks
Sachin

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Daneel Yaitskov <rt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33249|0                           |1
        is obsolete|                            |

--- Comment #9 from Daneel Yaitskov <rt...@gmail.com> ---
Created attachment 33368
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33368&action=edit
proxy passes http trailers from client

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Daneel Yaitskov <rt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33203|0                           |1
        is obsolete|                            |

--- Comment #6 from Daneel Yaitskov <rt...@gmail.com> ---
Created attachment 33239
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33239&action=edit
proxy client trailers for 2.4.17

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Mod Proxy does forward      |Mod Proxy forward trailers
                   |trailers in http chunked    |in http chunked request to
                   |request to backends         |backends
           Severity|normal                      |enhancement

--- Comment #1 from Eric Covener <co...@gmail.com> ---
Reclassifying as enhancement per Yann's assessment in the thread.  The trailers
are hop-by-hop so they are not being "blocked".

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Daneel Yaitskov <rt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Daneel Yaitskov <rt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.4.17                      |2.4.18

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

Daneel Yaitskov <rt...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.4.16                      |2.4.17

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 58177] Mod Proxy forward trailers in http chunked request to backends

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58177

--- Comment #7 from Christophe JAILLET <ch...@wanadoo.fr> ---
Hi,

a few remarks:
   - calling apr_bucket_immortal_create on a buffer allocated with apr_pstrcat
is odd.

   - apr_strtok(mod_trailers, ", ",...
should maybe be
     apr_strtok(mod_trailers, ", \t",...

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org