summaryrefslogtreecommitdiffstats
path: root/modules/http/http_protocol.c
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2015-04-01 12:03:56 +0200
committerGraham Leggett <minfrin@apache.org>2015-04-01 12:03:56 +0200
commit09c4bc62d0282af2c6b5e25bafbe0ea3b4d8293a (patch)
treece3fd0c1e36ce27f5e071c59817d2d1093811c5a /modules/http/http_protocol.c
parent* ssl_array_index is only used by code inside the HAVE_TLS_ALPN. So silence w... (diff)
downloadapache2-09c4bc62d0282af2c6b5e25bafbe0ea3b4d8293a.tar.xz
apache2-09c4bc62d0282af2c6b5e25bafbe0ea3b4d8293a.zip
http: Add support for RFC2324/RFC7168.
Sample implementation: http://people.apache.org/~minfrin/mod_teapot.c git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1670594 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http/http_protocol.c')
-rw-r--r--modules/http/http_protocol.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index fc7ec6ccbe..8cdcc6e65f 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -132,7 +132,7 @@ static const char * const status_lines[RESPONSE_CODES] =
"415 Unsupported Media Type",
"416 Requested Range Not Satisfiable",
"417 Expectation Failed",
- NULL, /* 418 */
+ "418 I'm A Teapot",
NULL, /* 419 */
NULL, /* 420 */
NULL, /* 421 */
@@ -695,6 +695,8 @@ AP_DECLARE(void) ap_method_registry_init(apr_pool_t *p)
register_one_method(p, "MKACTIVITY", M_MKACTIVITY);
register_one_method(p, "BASELINE-CONTROL", M_BASELINE_CONTROL);
register_one_method(p, "MERGE", M_MERGE);
+ register_one_method(p, "BREW", M_BREW);
+ register_one_method(p, "WHEN", M_WHEN);
}
AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname)
@@ -793,6 +795,16 @@ static int lookup_builtin_method(const char *method, apr_size_t len)
&& method[2] == 'P'
&& method[3] == 'Y'
? M_COPY : UNKNOWN_METHOD);
+ case 'B':
+ return (method[1] == 'R'
+ && method[2] == 'E'
+ && method[3] == 'W'
+ ? M_BREW : UNKNOWN_METHOD);
+ case 'W':
+ return (method[1] == 'H'
+ && method[2] == 'E'
+ && method[3] == 'N'
+ ? M_WHEN : UNKNOWN_METHOD);
default:
return UNKNOWN_METHOD;
}
@@ -1293,6 +1305,9 @@ static const char *get_canned_error_string(int status,
case HTTP_NETWORK_AUTHENTICATION_REQUIRED:
return("<p>The client needs to authenticate to gain\n"
"network access.</p>\n");
+ case HTTP_IM_A_TEAPOT:
+ return("<p>The resulting entity body MAY be short and\n"
+ "stout.</p>\n");
default: /* HTTP_INTERNAL_SERVER_ERROR */
/*
* This comparison to expose error-notes could be modified to