summaryrefslogtreecommitdiffstats
path: root/modules/mappers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mappers')
-rw-r--r--modules/mappers/mod_actions.c2
-rw-r--r--modules/mappers/mod_imap.c13
-rw-r--r--modules/mappers/mod_negotiation.c18
-rw-r--r--modules/mappers/mod_rewrite.c18
-rw-r--r--modules/mappers/mod_userdir.c4
5 files changed, 29 insertions, 26 deletions
diff --git a/modules/mappers/mod_actions.c b/modules/mappers/mod_actions.c
index 4bf7d76b8d..23c007cf09 100644
--- a/modules/mappers/mod_actions.c
+++ b/modules/mappers/mod_actions.c
@@ -195,7 +195,7 @@ static int action_handler(request_rec *r)
if (r->finfo.protection == 0) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"File does not exist: %s", r->filename);
- return NOT_FOUND;
+ return HTTP_NOT_FOUND;
}
}
diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c
index f32ccbb8e8..9c795b241a 100644
--- a/modules/mappers/mod_imap.c
+++ b/modules/mappers/mod_imap.c
@@ -497,16 +497,19 @@ static char *imap_url(request_rec *r, const char *base, const char *value)
static int imap_reply(request_rec *r, char *redirect)
{
if (!strcasecmp(redirect, "error")) {
- return SERVER_ERROR; /* they actually requested an error! */
+ /* they actually requested an error! */
+ return HTTP_INTERNAL_SERVER_ERROR;
}
if (!strcasecmp(redirect, "nocontent")) {
- return HTTP_NO_CONTENT; /* tell the client to keep the page it has */
+ /* tell the client to keep the page it has */
+ return HTTP_NO_CONTENT;
}
if (redirect && *redirect) {
+ /* must be a URL, so redirect to it */
ap_table_setn(r->headers_out, "Location", redirect);
- return REDIRECT; /* must be a URL, so redirect to it */
+ return HTTP_MOVED_TEMPORARILY;
}
- return SERVER_ERROR;
+ return HTTP_INTERNAL_SERVER_ERROR;
}
static void menu_header(request_rec *r, char *menu)
@@ -635,7 +638,7 @@ static int imap_handler(request_rec *r)
status = ap_pcfg_openfile(&imap, r->pool, r->filename);
if (status != APR_SUCCESS) {
- return NOT_FOUND;
+ return HTTP_NOT_FOUND;
}
base = imap_url(r, NULL, imap_base); /* set base according
diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c
index a5605dc082..083aab170b 100644
--- a/modules/mappers/mod_negotiation.c
+++ b/modules/mappers/mod_negotiation.c
@@ -811,7 +811,7 @@ static int read_type_map(negotiation_state *neg, request_rec *rr)
const char *body;
if (body1 == NULL) {
- return SERVER_ERROR;
+ return HTTP_INTERNAL_SERVER_ERROR;
}
strip_paren_comments(body1);
@@ -2297,7 +2297,7 @@ static void store_variant_list(request_rec *r, negotiation_state *neg)
/* Called if we got a "Choice" response from the variant selection algorithm.
* It checks the result of the chosen variant to see if it
- * is itself negotiated (if so, return error VARIANT_ALSO_VARIES).
+ * is itself negotiated (if so, return error HTTP_VARIANT_ALSO_VARIES).
* Otherwise, add the appropriate headers to the current response.
*/
@@ -2343,12 +2343,12 @@ static int setup_choice_response(request_rec *r, negotiation_state *neg,
* lead to cases in which a change in the set of variants or the
* negotiation algorithm of the nontransparent resource is never
* propagated up to a HTTP/1.1 cache which interprets Vary. To be
- * completely on the safe side we should return VARIANT_ALSO_VARIES
+ * completely on the safe side we should return HTTP_VARIANT_ALSO_VARIES
* for this type of recursive negotiation too.
*/
if (neg->is_transparent &&
ap_table_get(sub_req->err_headers_out, "TCN")) {
- return VARIANT_ALSO_VARIES;
+ return HTTP_VARIANT_ALSO_VARIES;
}
/* This catches the error that a transparent type map recursively
@@ -2375,7 +2375,7 @@ static int setup_choice_response(request_rec *r, negotiation_state *neg,
* variant list validators.
*/
if (sub_req->handler && strcmp(sub_req->handler, "type-map") == 0) {
- return VARIANT_ALSO_VARIES;
+ return HTTP_VARIANT_ALSO_VARIES;
}
/* This adds an appropriate Variant-Vary header if the subrequest
@@ -2470,7 +2470,7 @@ static int do_negotiation(request_rec *r, negotiation_state *neg,
*/
if (alg_result == alg_list) {
- /* send a list response or NOT_ACCEPTABLE error response */
+ /* send a list response or HTTP_NOT_ACCEPTABLE error response */
neg->send_alternates = 1; /* always include Alternates header */
set_neg_headers(r, neg, alg_result);
@@ -2490,13 +2490,13 @@ static int do_negotiation(request_rec *r, negotiation_state *neg,
* responses (they certainly won't if they conform to the
* HTTP/1.0 specification).
*/
- return MULTIPLE_CHOICES;
+ return HTTP_MULTIPLE_CHOICES;
}
if (!*bestp) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"no acceptable variant: %s", r->filename);
- return NOT_ACCEPTABLE;
+ return HTTP_NOT_ACCEPTABLE;
}
}
@@ -2632,7 +2632,7 @@ static int handle_multi(request_rec *r)
/* BLECH --- don't multi-resolve non-ordinary files */
if (sub_req->finfo.filetype != APR_REG) {
- res = NOT_FOUND;
+ res = HTTP_NOT_FOUND;
goto return_from_multi;
}
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c
index 22c41926e0..f66dfb448e 100644
--- a/modules/mappers/mod_rewrite.c
+++ b/modules/mappers/mod_rewrite.c
@@ -155,7 +155,7 @@
** all hooks are run, independend of result
**
** o at the last stage, the core module always
-** - says "BAD_REQUEST" if r->filename does not begin with "/"
+** - says "HTTP_BAD_REQUEST" if r->filename does not begin with "/"
** - prefix URL with document_root or replaced server_root
** with document_root and sets r->filename
** - always return a "OK" independed if the file really exists
@@ -1142,7 +1142,7 @@ static int hook_uri2file(request_rec *r)
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"attempt to make remote request from mod_rewrite "
"without proxy enabled: %s", r->filename);
- return FORBIDDEN;
+ return HTTP_FORBIDDEN;
}
/* make sure the QUERY_STRING and
@@ -1210,7 +1210,7 @@ static int hook_uri2file(request_rec *r)
r->status = HTTP_OK; /* make Apache kernel happy */
}
else {
- n = REDIRECT;
+ n = HTTP_MOVED_TEMPORARILY;
}
/* now do the redirection */
@@ -1221,7 +1221,7 @@ static int hook_uri2file(request_rec *r)
else if (strlen(r->filename) > 10 &&
strncmp(r->filename, "forbidden:", 10) == 0) {
/* This URLs is forced to be forbidden for the requester */
- return FORBIDDEN;
+ return HTTP_FORBIDDEN;
}
else if (strlen(r->filename) > 5 &&
strncmp(r->filename, "gone:", 5) == 0) {
@@ -1252,7 +1252,7 @@ static int hook_uri2file(request_rec *r)
/* the filename has to start with a slash! */
if (r->filename[0] != '/') {
- return BAD_REQUEST;
+ return HTTP_BAD_REQUEST;
}
/* if there is no valid prefix, we have
@@ -1386,7 +1386,7 @@ static int hook_fixup(request_rec *r)
"Options FollowSymLinks or SymLinksIfOwnerMatch is off "
"which implies that RewriteRule directive is forbidden: "
"%s", r->filename);
- return FORBIDDEN;
+ return HTTP_FORBIDDEN;
}
else {
/* FollowSymLinks is given, but the user can
@@ -1503,7 +1503,7 @@ static int hook_fixup(request_rec *r)
r->status = HTTP_OK; /* make Apache kernel happy */
}
else {
- n = REDIRECT;
+ n = HTTP_MOVED_TEMPORARILY;
}
/* now do the redirection */
@@ -1515,7 +1515,7 @@ static int hook_fixup(request_rec *r)
else if (strlen(r->filename) > 10 &&
strncmp(r->filename, "forbidden:", 10) == 0) {
/* This URL is forced to be forbidden for the requester */
- return FORBIDDEN;
+ return HTTP_FORBIDDEN;
}
else if (strlen(r->filename) > 5 &&
strncmp(r->filename, "gone:", 5) == 0) {
@@ -1536,7 +1536,7 @@ static int hook_fixup(request_rec *r)
/* the filename has to start with a slash! */
if (r->filename[0] != '/') {
- return BAD_REQUEST;
+ return HTTP_BAD_REQUEST;
}
/* Check for deadlooping:
diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c
index 7e83bb1fb3..7e6018c806 100644
--- a/modules/mappers/mod_userdir.c
+++ b/modules/mappers/mod_userdir.c
@@ -289,7 +289,7 @@ static int translate_userdir(request_rec *r)
{
redirect = ap_pstrcat(r->pool, x, w, userdir, dname, NULL);
ap_table_setn(r->headers_out, "Location", redirect);
- return REDIRECT;
+ return HTTP_MOVED_TEMPORARILY;
}
else
filename = ap_pstrcat(r->pool, x, w, userdir, NULL);
@@ -300,7 +300,7 @@ static int translate_userdir(request_rec *r)
else if (ap_strchr_c(userdir, ':')) {
redirect = ap_pstrcat(r->pool, userdir, "/", w, dname, NULL);
ap_table_setn(r->headers_out, "Location", redirect);
- return REDIRECT;
+ return HTTP_MOVED_TEMPORARILY;
}
else {
#ifdef WIN32