[asterisk-commits] mjordan: trunk r394901 - in /trunk: ./ main/http.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jul 20 22:10:43 CDT 2013
Author: mjordan
Date: Sat Jul 20 22:10:41 2013
New Revision: 394901
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394901
Log:
Tolerate presence of RFC2965 Cookie2 header by ignoring it
This patch modifies parsing of cookies in Asterisk's http server by doing an
explicit comparison of the "Cookie" header instead of looking at the first
6 characters to determine if the header is a cookie header. This avoids
parsing "Cookie2" headers and overwriting the previously parsed "Cookie"
header.
Note that we probably should be appending the cookies in each "Cookie"
header to the parsed results; however, while clients can send multiple
cookie headers they never really do. While this patch doesn't improve
Asterisk's behavior in that regard, it shouldn't make it any worse either.
Note that the solution in this patch was pointed out on the issue by the
issue reporter, Stuart Henderson.
(closes issue ASTERISK-21789)
Reported by: Stuart Henderson
Tested by: mjordan, Stuart Henderson
........
Merged revisions 394899 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 394900 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/main/http.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/main/http.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/http.c?view=diff&rev=394901&r1=394900&r2=394901
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Sat Jul 20 22:10:41 2013
@@ -857,7 +857,7 @@
struct ast_variable *v, *cookies=NULL;
for (v = headers; v; v = v->next) {
- if (!strncasecmp(v->name, "Cookie", 6)) {
+ if (!strcasecmp(v->name, "Cookie")) {
char *tmp = ast_strdupa(v->value);
if (cookies) {
ast_variables_destroy(cookies);
More information about the asterisk-commits
mailing list