output-json-http: output status as an integer

HTTP status is an integer and it should be written as such in the
JSON events. This will allow to have improved matching in log
analysis tools.
pull/1473/head
Eric Leblond 11 years ago committed by Victor Julien
parent da98b0b84f
commit 268285c49f

@ -327,7 +327,8 @@ void JsonHttpLogJSONExtended(json_t *js, htp_tx_t *tx)
if (tx->response_status != NULL) {
c = bstr_util_strdup_to_c(tx->response_status);
if (c != NULL) {
json_object_set_new(js, "status", json_string(c));
unsigned int val = strtoul(c, NULL, 10);
json_object_set_new(js, "status", json_integer(val));
SCFree(c);
}

Loading…
Cancel
Save