mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 19:43:03 +00:00
Merged revisions 135016 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r135016 | kpfleming | 2008-07-31 17:28:42 -0500 (Thu, 31 Jul 2008) | 11 lines Merged revisions 134983 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r134983 | kpfleming | 2008-07-31 17:18:11 -0500 (Thu, 31 Jul 2008) | 3 lines accomodate users who seem to lack a sense of humor :-) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@135034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
20
main/http.c
20
main/http.c
@@ -220,14 +220,14 @@ static struct ast_str *static_callback(struct ast_tcptls_session_instance *ser,
|
||||
return NULL;
|
||||
|
||||
out404:
|
||||
*status = 404;
|
||||
*title = ast_strdup("Not Found");
|
||||
return ast_http_error(404, "Not Found", NULL, "Nothing to see here. Move along.");
|
||||
return ast_http_error((*status = 404),
|
||||
(*title = ast_strdup("Not Found")),
|
||||
NULL, "The requested URL was not found on this server.");
|
||||
|
||||
out403:
|
||||
*status = 403;
|
||||
*title = ast_strdup("Access Denied");
|
||||
return ast_http_error(403, "Access Denied", NULL, "Sorry, I cannot let you do that, Dave.");
|
||||
return ast_http_error((*status = 403),
|
||||
(*title = ast_strdup("Access Denied")),
|
||||
NULL, "You do not have permission to access the requested URL.");
|
||||
}
|
||||
|
||||
|
||||
@@ -638,10 +638,10 @@ static struct ast_str *handle_uri(struct ast_tcptls_session_instance *ser, char
|
||||
if (!strcasecmp(uri, redirect->target)) {
|
||||
char buf[512];
|
||||
snprintf(buf, sizeof(buf), "Location: %s\r\n", redirect->dest);
|
||||
out = ast_http_error(302, "Moved Temporarily", buf,
|
||||
"There is no spoon...");
|
||||
*status = 302;
|
||||
*title = ast_strdup("Moved Temporarily");
|
||||
out = ast_http_error((*status = 302),
|
||||
(*title = ast_strdup("Moved Temporarily")),
|
||||
buf, "Redirecting...");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user