[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/url/url-cookie.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/url/url-cookie.el,v |
Date: |
Sun, 01 Apr 2007 15:38:50 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 07/04/01 15:38:50
Index: url-cookie.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-cookie.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- url-cookie.el 21 Jan 2007 03:24:41 -0000 1.20
+++ url-cookie.el 1 Apr 2007 15:38:50 -0000 1.21
@@ -272,7 +272,15 @@
storage (cdr storage)
cookies (cdr cur))
(if (and (car cur)
- (string-match (concat "^.*" (regexp-quote (car cur)) "$") host))
+ (string-match
+ (concat "^.*"
+ (regexp-quote
+ ;; Remove the dot from wildcard domains
+ ;; before matching.
+ (if (eq ?. (aref (car cur) 0))
+ (substring (car cur) 1)
+ (car cur)))
+ "$") host))
;; The domains match - a possible hit!
(while cookies
(setq cur (car cookies)
@@ -344,7 +352,13 @@
((>= numdots mindots) ; We have enough dots in domain name
;; Need to check and make sure the host is actually _in_ the
;; domain it wants to set a cookie for though.
- (string-match (concat (regexp-quote domain) "$") host))
+ (string-match (concat (regexp-quote
+ ;; Remove the dot from wildcard domains
+ ;; before matching.
+ (if (eq ?. (aref domain 0))
+ (substring domain 1)
+ domain))
+ "$") host))
(t
nil))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/url/url-cookie.el,v,
Chong Yidong <=