]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve-http: print <unknown> like in eve-files 884/head
authorVictor Julien <victor@inliniac.net>
Tue, 11 Mar 2014 11:11:33 +0000 (12:11 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 11 Mar 2014 11:11:33 +0000 (12:11 +0100)
When UA or Host are unknown, print <unknown> instead of <useragent
unknown> or <hostname unknown>.

Bug #1131.

src/output-json-http.c

index 339adf833a10a68a5e05d91fac9e50421a2a9818..f0649b3fc030174fe6bc0ddbe82fcf6db5e55b3f 100644 (file)
@@ -89,7 +89,7 @@ static void JsonHttpLogJSON(JsonHttpLogThread *aft, json_t *js, htp_tx_t *tx)
             SCFree(c);
         }
     } else {
-        json_object_set_new(hjs, "hostname", json_string("<hostname unknown>"));
+        json_object_set_new(hjs, "hostname", json_string("<unknown>"));
     }
 
     /* uri */
@@ -114,7 +114,7 @@ static void JsonHttpLogJSON(JsonHttpLogThread *aft, json_t *js, htp_tx_t *tx)
             SCFree(c);
         }
     } else {
-        json_object_set_new(hjs, "http_user_agent", json_string("<useragent unknown>"));
+        json_object_set_new(hjs, "http_user_agent", json_string("unknown>"));
     }
 
     /* x-forwarded-for */