]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
doc: add http.connection ref and fix location
authorjason taylor <jtfas90@gmail.com>
Fri, 19 Apr 2024 20:09:59 +0000 (20:09 +0000)
committerVictor Julien <victor@inliniac.net>
Mon, 6 May 2024 17:35:04 +0000 (19:35 +0200)
Signed-off-by: jason taylor <jtfas90@gmail.com>
doc/userguide/rules/http-keywords.rst

index bcc907687657cd43815f8aff46a0f259423430b6..34794c8bd9c9f0c033ea1d5f45eea53d29f68fe5 100644 (file)
@@ -82,6 +82,7 @@ Response Keywords:
 
 Request or Response Keywords:
  * :ref:`file.data`
+ * :ref:`http.connection`
  * :ref:`http.content_len`
  * :ref:`http.content_type`
  * :ref:`http.cookie`
@@ -195,34 +196,6 @@ Example HTTP Request::
 .. note:: ``http.accept_lang`` does not include the leading space or
   trailing \\r\\n
 
-.. _http.connection:
-
-http.connection
----------------
-
-The ``http.connection`` keyword is used to match on the Connection field that
-can be present in HTTP request headers.
-
-It is possible to use any of the :doc:`payload-keywords` with the
-``http.connection`` keyword.
-
-Example HTTP Request::
-
-  GET /index.html HTTP/1.1
-  User-Agent: Mozilla/5.0
-  Accept-Language: en-US
-  Host: suricata.io
-  Connection: Keep-Alive
-
-.. container:: example-rule
-
-  alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"HTTP Connection Example"; \
-  flow:established,to_server; :example-rule-options:`http.connection; \
-  content:"Keep-Alive";` bsize:10; classtype:bad-unknown; sid:94; rev:1;)
-
-.. note:: ``http.connection`` does not include the leading space or trailing
-   \\r\\n
-
 .. _http.host:
 
 http.host
@@ -915,6 +888,34 @@ setting.
 .. note:: ``file.data`` supports multiple buffer matching, see
   :doc:`multi-buffer-matching`.
 
+.. _http.connection:
+
+http.connection
+---------------
+
+The ``http.connection`` keyword is used to match on the Connection field that
+can be present in HTTP request or response headers.
+
+It is possible to use any of the :doc:`payload-keywords` with the
+``http.connection`` keyword.
+
+Example HTTP Request::
+
+  GET /index.html HTTP/1.1
+  User-Agent: Mozilla/5.0
+  Accept-Language: en-US
+  Host: suricata.io
+  Connection: Keep-Alive
+
+.. container:: example-rule
+
+  alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"HTTP Connection Example"; \
+  flow:established,to_server; :example-rule-options:`http.connection; \
+  content:"Keep-Alive";` bsize:10; classtype:bad-unknown; sid:94; rev:1;)
+
+.. note:: ``http.connection`` does not include the leading space or trailing
+   \\r\\n
+
 .. _http.content_len:
 
 http.content_len