0

Apache does not seem to parse custom headers

Here is what is coming on tcpdump:

Host: localhost:8022
Accept: */*
Accept-Encoding: gzip
User-Agent: JoeDog/1.00 [en] (X11; I; Siege 3.0.0)
customheader: pkumar0
X-Forwarded-For: 127.0.0.1
X-Forwarded-Host: localhost:8022
X-Forwarded-Server: pkslave-emulator.local
Connection: Keep-Alive

I see customheader here. But when I parse it on the debugger on the function that hooks the header parser phase of apache, I get this:

(gdb) break ApacheHooks::hook_header_parser_begin
Breakpoint 1 at 0x2b4f84571911: file ApacheHooks.cpp, line 544.
(gdb) c
Continuing.
[Switching to Thread 0x2b4f86a95940 (LWP 3444)]

Breakpoint 1, ApacheHooks::hook_header_parser_begin (r=0x19c21a10) at ApacheHooks.cpp:544
544 {
(gdb) dump_table r->headers_in
[0] 'Host'='localhost:8022' [0x19c22ef6]
[1] 'Accept'='*/*' [0x19c22f10]
[2] 'Accept-Encoding'='gzip' [0x19c22f29]
[3] 'User-Agent'='JoeDog/1.00 [en] (X11; I; Siege 3.0.0)' [0x19c22f3c]
[4] 'X-Forwarded-For'='127.0.0.1' [0x19c23061]
[5] 'X-Forwarded-Host'='localhost:8022' [0x19c23082]
[6] 'X-Forwarded-Server'='pkslave-emulator.local' [0x19c230ac]
[7] 'Connection'='Keep-Alive' [0x19c230d4]

No customheader

pkumar0
  • 2,069
  • 3
  • 14
  • 21
  • 1
    try mod_headers, since the core complies with the HTTP – Deadooshka Apr 21 '15 at 04:51
  • Sorry, I debugged more and figured out that another callback was removing the custom header. Please ignore. I wish there was a way to delete this question. – pkumar0 Apr 21 '15 at 19:20

0 Answers0