]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Manager cookies are not compatible with RFC2109.
authorLeif Madsen <leif@leifmadsen.com>
Mon, 17 May 2010 14:35:18 +0000 (14:35 +0000)
committerLeif Madsen <leif@leifmadsen.com>
Mon, 17 May 2010 14:35:18 +0000 (14:35 +0000)
The Version field in the cookies we're setting contain quotes around the version
number which is not compatible with RFC2109 and breaks some implementations.

(closes issue #17231)
Reported by: ecarruda
Patches:
      manager_rfc2109-trunk-v1.patch uploaded by ecarruda (license 559)
      manager_rfc2109-1.6.2-v1.patch uploaded by ecarruda (license 559)
Tested by: ecarruda, russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@263456 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/http.c

index f8d9f1e526d6f947458c65b2d9a3faabe2628274..213701d61fc0186c11d357614404dc0e9b5a8a0c 100644 (file)
@@ -572,7 +572,7 @@ char *ast_http_setcookie(const char *var, const char *val, int expires, char *bu
 {
        char *c;
        c = buf;
-       ast_build_string(&c, &buflen, "Set-Cookie: %s=\"%s\"; Version=\"1\"", var, val);
+       ast_build_string(&c, &buflen, "Set-Cookie: %s=\"%s\"; Version=1", var, val);
        if (expires)
                ast_build_string(&c, &buflen, "; Max-Age=%d", expires);
        ast_build_string(&c, &buflen, "\r\n");