Bug #1067
closedContent-Type header appears to be dropped [solved]
Description
I found something that I think might be a bug in 1.5.0-r1691.
I was setting up lighttpd to proxy some requests to Jetty, but I noticed that the Content-Type headers that one of my servlets sets was getting lost at some point. After further examination of the packets being sent, I have determined that Jetty is sending the Content-Type header, but lighttpd must be dropping it. Also, other headers such as Location and Servlet-Engine seem to get lost.
I have attached an example of the AJP13 header response onto this ticket.
-- isomorphix
Files
Updated by Anonymous over 17 years ago
One other quick comment, other headers such as X-Test-Header go through just fine. The difference I can see being that in the AJP13 response the X-Test-Header is encoded as text and the other headers being blocked are the ones that get encoded as A0##.
-- ismorphix
Updated by Anonymous about 17 years ago
Hi,
the problem is in src/mod_proxy_backend_ajp13.c on line 287
286: if (is_header && (len & AJP13_COMMON_HEADER_CODE)) {
287: p = keyvalue_get_value(response_headers, len);
288: if(p) len = strlen(p);
289: }
It's looking for key including AJP13_COMMON_HEADER_CODE which is 0xA000. I fixed it masking the upper byte like this: len & 0x00FF. Now it's working as expected. ;-) I also attached patch for this bug (mod_proxy_backend_ajp13.patch). Thank you for lighttpd. I love it! ;-)
-- rush
Updated by stbuehler over 15 years ago
- Status changed from New to Fixed
- Assignee deleted (
jakabosky) - Patch available set to No
Fixed in r2001
Also available in: Atom