summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/http.h
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2014-07-12 14:34:14 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2014-07-12 14:34:14 +0000
commit71b9f122458826a87fba1b2e6f94edd1ba7b8a7d (patch)
tree6e0dfd0667bbcd49418615f1133cc51b15ad94df /usr.sbin/relayd/http.h
parente2f2a8301eba5092be736f56dc9ba9760bb3ca03 (diff)
Move HTTP error codes into http.h.
ok benno@
Diffstat (limited to 'usr.sbin/relayd/http.h')
-rw-r--r--usr.sbin/relayd/http.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/usr.sbin/relayd/http.h b/usr.sbin/relayd/http.h
index 0cf9b790244..69343cbb7c1 100644
--- a/usr.sbin/relayd/http.h
+++ b/usr.sbin/relayd/http.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: http.h,v 1.2 2014/07/11 11:48:50 reyk Exp $ */
+/* $OpenBSD: http.h,v 1.3 2014/07/12 14:34:13 reyk Exp $ */
/*
* Copyright (c) 2012 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -72,6 +72,53 @@ struct http_method {
{ HTTP_METHOD_NONE, NULL } \
}
+struct http_error {
+ int error_code;
+ const char *error_name;
+};
+#define HTTP_ERRORS { \
+ { 100, "Continue" }, \
+ { 101, "Switching Protocols" }, \
+ { 200, "OK" }, \
+ { 201, "Created" }, \
+ { 202, "Accepted" }, \
+ { 203, "Non-Authorative Information" }, \
+ { 204, "No Content" }, \
+ { 205, "Reset Content" }, \
+ { 206, "Partial Content" }, \
+ { 300, "Multiple Choices" }, \
+ { 301, "Moved Permanently" }, \
+ { 302, "Moved Temporarily" }, \
+ { 303, "See Other" }, \
+ { 304, "Not Modified" }, \
+ { 307, "Temporary Redirect" }, \
+ { 400, "Bad Request" }, \
+ { 401, "Unauthorized" }, \
+ { 402, "Payment Required" }, \
+ { 403, "Forbidden" }, \
+ { 404, "Not Found" }, \
+ { 405, "Method Not Allowed" }, \
+ { 406, "Not Acceptable" }, \
+ { 407, "Proxy Authentication Required" }, \
+ { 408, "Request Timeout" }, \
+ { 409, "Conflict" }, \
+ { 410, "Gone" }, \
+ { 411, "Length Required" }, \
+ { 412, "Precondition Failed" }, \
+ { 413, "Request Entity Too Large" }, \
+ { 414, "Request-URL Too Long" }, \
+ { 415, "Unsupported Media Type" }, \
+ { 416, "Requested Range Not Satisfiable" }, \
+ { 417, "Expectation Failed" }, \
+ { 500, "Internal Server Error" }, \
+ { 501, "Not Implemented" }, \
+ { 502, "Bad Gateway" }, \
+ { 503, "Service Unavailable" }, \
+ { 504, "Gateway Timeout" }, \
+ { 505, "HTTP Version Not Supported" }, \
+ { 0, NULL } \
+}
+
/* Used during runtime */
struct http_descriptor {
struct kv http_pathquery;