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:
Kevin P. Fleming
2008-07-31 22:34:44 +00:00
parent 6d0cdb3f22
commit e6c7675f32

View File

@@ -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;
}
}