Function: url-http-handle-cookies

url-http-handle-cookies is a byte-compiled function defined in url-http.el.gz.

Signature

(url-http-handle-cookies)

Documentation

Handle all set-cookie / set-cookie2 headers in an HTTP response.

The buffer must already be narrowed to the headers, so mail-fetch-field will work correctly.

Source Code

;; Defined in /usr/src/emacs/lisp/url/url-http.el.gz
(defun url-http-handle-cookies ()
  "Handle all set-cookie / set-cookie2 headers in an HTTP response.
The buffer must already be narrowed to the headers, so `mail-fetch-field' will
work correctly."
  (let ((cookies (nreverse (mail-fetch-field "Set-Cookie" nil nil t)))
	(cookies2 (nreverse (mail-fetch-field "Set-Cookie2" nil nil t))))
    (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies)))
    (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2)))
    (while cookies
      (url-cookie-handle-set-cookie (pop cookies)))
;;;     (while cookies2
;;;       (url-cookie-handle-set-cookie2 (pop cookies)))
    )
  )