Apache 似乎没有解析自定义标头
以下是 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
我在这里看到了customheader。但是,当我在钩子 apache 的标头解析器阶段的函数的调试器上解析它时,我得到了这个:
(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]
没有自定义标头