Revision: 3454 Author: edi URL: http://bknr.net/trac/changeset/3454
Integrate patch from Daniel Janus
U trunk/thirdparty/drakma/CHANGELOG.txt U trunk/thirdparty/drakma/cookies.lisp U trunk/thirdparty/drakma/doc/index.html U trunk/thirdparty/drakma/packages.lisp U trunk/thirdparty/drakma/specials.lisp
Modified: trunk/thirdparty/drakma/CHANGELOG.txt =================================================================== --- trunk/thirdparty/drakma/CHANGELOG.txt 2008-07-16 08:59:09 UTC (rev 3453) +++ trunk/thirdparty/drakma/CHANGELOG.txt 2008-07-16 09:16:15 UTC (rev 3454) @@ -1,3 +1,5 @@ +Added *ALLOW-DOTLESS-COOKIE-DOMAINS-P* (thanks to Daniel Janus) + Version 0.11.5 2008-03-21 Added workaround for CLISP (thanks to Anton Vodonosov)
Modified: trunk/thirdparty/drakma/cookies.lisp =================================================================== --- trunk/thirdparty/drakma/cookies.lisp 2008-07-16 08:59:09 UTC (rev 3453) +++ trunk/thirdparty/drakma/cookies.lisp 2008-07-16 09:16:15 UTC (rev 3454) @@ -93,8 +93,10 @@
(defun valid-cookie-domain-p (domain) "Checks if the string DOMAIN contains enough dots to be -acceptable." - (or (string-equal domain "localhost") +acceptable. If *ALLOW-DOTLESS-COOKIE-DOMAINS-P* is non-NIL, +every domain name is considered acceptable." + (or *allow-dotless-cookie-domains-p* + (string-equal domain "localhost") (> (count #. (normalize-cookie-domain domain) :test #'char=) 1)))
(defun cookie-domain-matches (domain uri)
Modified: trunk/thirdparty/drakma/doc/index.html =================================================================== --- trunk/thirdparty/drakma/doc/index.html 2008-07-16 08:59:09 UTC (rev 3453) +++ trunk/thirdparty/drakma/doc/index.html 2008-07-16 09:16:15 UTC (rev 3454) @@ -84,6 +84,7 @@ <li><a href="#cookie-jar-cookies"><code>cookie-jar-cookies</code></a> <li><a href="#cookie="><code>cookie=</code></a> <li><a href="#delete-old-cookies"><code>delete-old-cookies</code></a> + <li><a href="#*allow-dotless-cookie-domains-p*"><code>*allow-dotless-cookie-domains-p*</code></a> <li><a href="#*ignore-unparseable-cookie-dates-p*"><code>*ignore-unparseable-cookie-dates-p*</code></a> </ol> <li><a href="#headers">Headers</a> @@ -1261,6 +1262,20 @@ <!-- End of entry for DELETE-OLD-COOKIES -->
+<!-- Entry for *ALLOW-DOTLESS-COOKIE-DOMAINS-P* --> + +<p><br>[Special variable]<br><a class=none name='*allow-dotless-cookie-domains-p*'><b>*allow-dotless-cookie-domains-p*</b></a> +<blockquote><br> + +When this variable is not <code>NIL</code>, cookie domains containing +no dots are considered valid. The default is <code>NIL</code>, +meaning to disallow such domains except for <code>"localhost"<code>. + +</blockquote> + +<!-- End of entry for *ALLOW-DOTLESS-COOKIE-DOMAINS-P* --> + + <!-- Entry for *IGNORE-UNPARSEABLE-COOKIE-DATES-P* -->
<p><br>[Special variable]<br><a class=none name='*ignore-unparseable-cookie-dates-p*'><b>*ignore-unparseable-cookie-dates-p*</b></a>
Modified: trunk/thirdparty/drakma/packages.lisp =================================================================== --- trunk/thirdparty/drakma/packages.lisp 2008-07-16 08:59:09 UTC (rev 3453) +++ trunk/thirdparty/drakma/packages.lisp 2008-07-16 09:16:15 UTC (rev 3454) @@ -33,7 +33,8 @@ (:use :cl :puri :flexi-streams :chunga) ;; the variable defined in the ASDF system definition (:import-from :drakma-asd :*drakma-version-string*) - (:export :*body-format-function* + (:export :*allow-dotless-cookie-domains-p* + :*body-format-function* :*drakma-default-external-format* :*header-stream* :*ignore-unparseable-cookie-dates-p*
Modified: trunk/thirdparty/drakma/specials.lisp =================================================================== --- trunk/thirdparty/drakma/specials.lisp 2008-07-16 08:59:09 UTC (rev 3453) +++ trunk/thirdparty/drakma/specials.lisp 2008-07-16 09:16:15 UTC (rev 3454) @@ -70,6 +70,11 @@ which incoming and outgoing headers will be written for debugging purposes.")
+(defvar *allow-dotless-cookie-domains-p* nil + "When this variable is not NIL, cookie domains containing no dots +are considered valid. The default is NIL, meaning to disallow such +domains except for "localhost".") + (defvar *ignore-unparseable-cookie-dates-p* nil "Whether Drakma is allowed to treat `Expires' dates in cookie headers as non-existent if it can't parse them. If the value of this