Project

General

Profile

Feature #478 » XFF_basic_extended-http-log.patch

X-Forwarded-For (XFF) header - Ignacio Sanchez, 06/13/2012 10:29 AM

View differences:

src/log-httplog.c 2012-06-13 16:02:03.186444701 +0100
{
PrintBufferData(aft->data, &aft->data_offset, OUTPUT_BUFFER_SIZE, " [**] ");
/* XFF */
htp_header_t *h_xff = NULL;
if (tx->request_headers != NULL) {
h_xff = table_getc(tx->request_headers, "x-forwarded-for");
}
if (h_xff != NULL) {
PrintRawUriBuf(aft->data, &aft->data_offset, OUTPUT_BUFFER_SIZE,
(uint8_t *)bstr_ptr(h_xff->value),
bstr_len(h_xff->value));
} else {
PrintBufferData(aft->data, &aft->data_offset, OUTPUT_BUFFER_SIZE, "<no xff>");
}
PrintBufferData(aft->data, &aft->data_offset, OUTPUT_BUFFER_SIZE, " [**] ");
/* referer */
htp_header_t *h_referer = NULL;
if (tx->request_headers != NULL) {
(1-1/7)