comparison lisp/w3/url-cookie.el @ 44:8d2a9b52c682 r19-15prefinal

Import from CVS: tag r19-15prefinal
author cvs
date Mon, 13 Aug 2007 08:55:10 +0200
parents 1a767b41a199
children
comparison
equal deleted inserted replaced
43:23cafc5d2038 44:8d2a9b52c682
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"