comparison lisp/w3/url-cookie.el @ 86:364816949b59 r20-0b93

Import from CVS: tag r20-0b93
author cvs
date Mon, 13 Aug 2007 09:09:02 +0200
parents 6a378aca36af
children a145efe76779
comparison
equal deleted inserted replaced
85:c661705957e0 86:364816949b59
1 ;;; url-cookie.el --- Netscape Cookie support 1 ;;; url-cookie.el --- Netscape Cookie support
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/01/16 22:34:30 3 ;; Created: 1997/01/26 00:40:23
4 ;; Version: 1.9 4 ;; Version: 1.10
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.
333 url-current-server)))) 333 url-current-server))))
334 ;; user wants to be asked, and declined. 334 ;; user wants to be asked, and declined.
335 nil) 335 nil)
336 ((url-cookie-host-can-set-p url-current-server domain) 336 ((url-cookie-host-can-set-p url-current-server domain)
337 ;; Cookie is accepted by the user, and passes our security checks 337 ;; Cookie is accepted by the user, and passes our security checks
338 (while rest 338 (let ((cur nil))
339 (url-cookie-store (car (car rest)) (cdr (car rest)) 339 (while rest
340 expires domain path secure) 340 (setq cur (pop rest))
341 (setq rest (cdr rest)))) 341 ;; Oh gross, this is for microsoft & netscape.
342 ;; Fuck them fuck them fuchk them fuck them.
343 (if (string-match "^\\([^=]+\\)=\\(.*\\)" (cdr cur))
344 (setq rest (cons (cons (match-string 1 (cdr cur))
345 (match-string 2 (cdr cur))) rest)
346 cur (cons (car cur) "")))
347 (url-cookie-store (car cur) (cdr cur)
348 expires domain path secure))))
342 (t 349 (t
343 (url-warn 'url (format 350 (url-warn 'url (format
344 (concat "%s tried to set a cookie for domain %s\n" 351 (concat "%s tried to set a cookie for domain %s\n"
345 "Permission denied - cookie rejected.\n" 352 "Permission denied - cookie rejected.\n"
346 "Set-Cookie: %s") 353 "Set-Cookie: %s")