Skip to content

Commit

Permalink
eve/http: add location header independent of status availability
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Jan 8, 2024
1 parent 9a14d7a commit 1dcf69b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/output-json-http.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,12 @@ static void EveHttpLogJSONExtended(JsonBuilder *js, htp_tx_t *tx)
status_string, status_size);
unsigned int val = strtoul(status_string, NULL, 10);
jb_set_uint(js, "status", val);
}

htp_header_t *h_location = htp_table_get_c(tx->response_headers, "location");
if (h_location != NULL) {
jb_set_string_from_bytes(
js, "redirect", bstr_ptr(h_location->value), bstr_len(h_location->value));
}
htp_header_t *h_location = htp_table_get_c(tx->response_headers, "location");
if (h_location != NULL) {
jb_set_string_from_bytes(
js, "redirect", bstr_ptr(h_location->value), bstr_len(h_location->value));
}

/* length */
Expand Down

0 comments on commit 1dcf69b

Please sign in to comment.