[asterisk-commits] kpfleming: branch 1.6.0 r135034 - in /branches/1.6.0: ./ main/http.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 31 17:34:45 CDT 2008


Author: kpfleming
Date: Thu Jul 31 17:34:44 2008
New Revision: 135034

URL: http://svn.digium.com/view/asterisk?view=rev&rev=135034
Log:
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 :-)


........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/http.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/http.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/http.c?view=diff&rev=135034&r1=135033&r2=135034
==============================================================================
--- branches/1.6.0/main/http.c (original)
+++ branches/1.6.0/main/http.c Thu Jul 31 17:34:44 2008
@@ -220,14 +220,14 @@
 	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 @@
 		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;
 		}
 	}




More information about the asterisk-commits mailing list