Function: url-cookie-host-can-set-p

url-cookie-host-can-set-p is a byte-compiled function defined in url-cookie.el.gz.

Signature

(url-cookie-host-can-set-p HOST DOMAIN)

Source Code

;; Defined in /usr/src/emacs/lisp/url/url-cookie.el.gz
(defun url-cookie-host-can-set-p (host domain)
  (cond
   ((string= host domain)	; Apparently netscape lets you do this
    t)
   ((zerop (length domain))
    nil)
   (t
    ;; Remove the dot from wildcard domains before matching.
    (when (eq ?. (aref domain 0))
      (setq domain (substring domain 1)))
    (and (url-domsuf-cookie-allowed-p domain)
         (string-suffix-p domain host 'ignore-case)))))