comparison lisp/w3/url-cookie.el @ 116:9f59509498e1 r20-1b10

Import from CVS: tag r20-1b10
author cvs
date Mon, 13 Aug 2007 09:23:06 +0200
parents 8619ce7e4c50
children 9b50b4588a93
comparison
equal deleted inserted replaced
115:f109f7dabbe2 116:9f59509498e1
1 ;;; url-cookie.el --- Netscape Cookie support 1 ;;; url-cookie.el --- Netscape Cookie support
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/03/19 00:42:23 3 ;; Created: 1997/03/26 00:06:01
4 ;; Version: 1.14 4 ;; Version: 1.15
5 ;; Keywords: comm, data, processes, hypermedia 5 ;; Keywords: comm, data, processes, hypermedia
6 6
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) 8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu)
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
372 ((url-cookie-host-can-set-p (url-host url-current-object) domain) 372 ((url-cookie-host-can-set-p (url-host url-current-object) domain)
373 ;; Cookie is accepted by the user, and passes our security checks 373 ;; Cookie is accepted by the user, and passes our security checks
374 (let ((cur nil)) 374 (let ((cur nil))
375 (while rest 375 (while rest
376 (setq cur (pop rest)) 376 (setq cur (pop rest))
377 ;; Oh gross, this is for microsoft & netscape.
378 ;; Fuck them fuck them fuchk them fuck them.
379 (if (string-match "^\\([^=]+\\)=\\(.*\\)" (cdr cur))
380 (setq rest (cons (cons (match-string 1 (cdr cur))
381 (match-string 2 (cdr cur))) rest)
382 cur (cons (car cur) "")))
383 (url-cookie-store (car cur) (cdr cur) 377 (url-cookie-store (car cur) (cdr cur)
384 expires domain path secure)))) 378 expires domain path secure))))
385 (t 379 (t
386 (url-warn 'url (format 380 (url-warn 'url (format
387 (concat "%s tried to set a cookie for domain %s\n" 381 (concat "%s tried to set a cookie for domain %s\n"