]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: Move http method enum from proto_http to sample
authorThierry FOURNIER <tfournier@arpalert.org>
Thu, 23 Jul 2015 16:16:33 +0000 (18:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Aug 2015 12:14:10 +0000 (14:14 +0200)
This is useful to prevent cross includes. The header file sample.h
needs to include proto_http, stick_tables.h will need to include
sample.h and proto_http includes stick_tables.h.

I choose to move the known http method define because this enum is
mainly used in sample.h. This enum is used for the sample type method.

include/types/proto_http.h
include/types/sample.h

index d6f916600c343176643bba7aa59ae2f267607c72..975df010a726157e0a2ccc5189dd71b0228d9844 100644 (file)
@@ -218,20 +218,6 @@ enum {
        PERSIST_TYPE_IGNORE,            /* ignore-persist */
 };
 
-/* Known HTTP methods */
-enum http_meth_t {
-       HTTP_METH_NONE = 0,
-       HTTP_METH_OPTIONS,
-       HTTP_METH_GET,
-       HTTP_METH_HEAD,
-       HTTP_METH_POST,
-       HTTP_METH_PUT,
-       HTTP_METH_DELETE,
-       HTTP_METH_TRACE,
-       HTTP_METH_CONNECT,
-       HTTP_METH_OTHER, /* Must be the last entry */
-} __attribute__((packed));
-
 enum ht_auth_m {
        HTTP_AUTH_WRONG         = -1,           /* missing or unknown */
        HTTP_AUTH_UNKNOWN       = 0,
index 8f67cfb32d44d58b7118ff6abd2a86eb48f52299..a7db5c04c0bcff5d24f3babdd8ce75fb008c2831 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <common/chunk.h>
 #include <common/mini-clist.h>
-#include <types/proto_http.h>
 
 struct arg;
 
@@ -211,6 +210,20 @@ enum {
 struct session;
 struct stream;
 
+/* Known HTTP methods */
+enum http_meth_t {
+       HTTP_METH_NONE = 0,
+       HTTP_METH_OPTIONS,
+       HTTP_METH_GET,
+       HTTP_METH_HEAD,
+       HTTP_METH_POST,
+       HTTP_METH_PUT,
+       HTTP_METH_DELETE,
+       HTTP_METH_TRACE,
+       HTTP_METH_CONNECT,
+       HTTP_METH_OTHER, /* Must be the last entry */
+} __attribute__((packed));
+
 /* a sample context might be used by any sample fetch function in order to
  * store information needed across multiple calls (eg: restart point for a
  * next occurrence). By definition it may store up to 8 pointers, or any