;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require w3m-util w3m url-domsuf] 2) #@77 A list of cookie elements. Currently only browser local cookies are stored. (defvar w3m-cookies nil (#$ . 177)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\302\311\304\305\306\312&\210\300\313\302\314\304\305\306\315&\210\300\316\317\320\304\305\306\321&\210\300\322\323\324\304\305\306\325&\207" [custom-declare-variable w3m-cookie-accept-domains nil "A list of trusted domain name string." :group w3m :type (repeat (string :format "Domain name: %v")) w3m-cookie-reject-domains "A list of untrusted domain name string." (repeat (string :format "Domain name: %v")) w3m-cookie-accept-bad-cookies "If nil, don't accept bad cookies.\nIf t, accept bad cookies.\nIf ask, ask user whether accept bad cookies or not." (radio (const :tag "Don't accept bad cookies" nil) (const :tag "Ask accepting bad cookies" ask) (const :tag "Always accept bad cookies" t)) w3m-cookie-save-cookies t "Non-nil means save cookies when emacs-w3m cookie system shutdown." boolean w3m-cookie-file (expand-file-name ".cookie" w3m-profile-directory) "File in which cookies are kept." file] 8) #@27 Return the url of COOKIE. (defalias 'w3m-cookie-url '(macro . #[(cookie) "\301\302BB\207" [cookie aref (0)] 3 (#$ . 1265)])) #@30 Return the domain of COOKIE. (defalias 'w3m-cookie-domain '(macro . #[(cookie) "\301\302BB\207" [cookie aref (1)] 3 (#$ . 1397)])) #@34 Return whether COOKIE is secure. (defalias 'w3m-cookie-secure '(macro . #[(cookie) "\301\302BB\207" [cookie aref (2)] 3 (#$ . 1535)])) #@28 Return the name of COOKIE. (defalias 'w3m-cookie-name '(macro . #[(cookie) "\301\302BB\207" [cookie aref (3)] 3 (#$ . 1677)])) #@29 Return the value of COOKIE. (defalias 'w3m-cookie-value '(macro . #[(cookie) "\301\302BB\207" [cookie aref (4)] 3 (#$ . 1811)])) #@42 Return the relative file path of COOKIE. (defalias 'w3m-cookie-path '(macro . #[(cookie) "\301\302BB\207" [cookie aref (5)] 3 (#$ . 1947)])) #@41 Return a version information of COOKIE. (defalias 'w3m-cookie-version '(macro . #[(cookie) "\301\302BB\207" [cookie aref (6)] 3 (#$ . 2095)])) #@33 Return when COOKIE will expire. (defalias 'w3m-cookie-expires '(macro . #[(cookie) "\301\302BB\207" [cookie aref (7)] 3 (#$ . 2245)])) #@58 Return t if COOKIE is marked to be ignored by emacs-w3m. (defalias 'w3m-cookie-ignore '(macro . #[(cookie) "\301\302BB\207" [cookie aref (8)] 3 (#$ . 2387)])) (defalias 'w3m-cookie-create #[(&rest args) "\306\307\310\"\211\211\311\312\n\313\"I\210)\211\314\312\n\315\"I\210)\211\316\312\n\317\"I\210)\211\320\312\n\321\"I\210)\211\322\312\n\323\"I\210)\211\324\312\n\325\"I\210)\211\326\312\n\327\"\206V\311I\210)\211\330\312\n\331\"I\210)\211 \332\312\n\333\"I\210))\207" [cookie #1=#:v args #2=#:v #3=#:v #4=#:v make-vector 9 nil 0 plist-get :url 1 :domain 2 :secure 3 :name 4 :value 5 :path 6 :version 7 :expires 8 :ignore #5=#:v #6=#:v #7=#:v #8=#:v #9=#:v] 6]) #@15 Store COOKIE. (defalias 'w3m-cookie-store #[(cookie) "\305\3062N \305\211\205L @\211\307H\f\307H\230\203D\n\310H\f\310H\230\203D\n\311H\f\311H\230\203D\n\312H\203:\313\202?\314\n \"\315\306\313\"\210 A\211\204\305*0\210?\205Y\f B\211)\207" [ignored w3m-cookies c --dolist-tail-- cookie nil found 1 5 3 8 t delq throw] 4 (#$ . 3084)]) #@26 Remove COOKIE if stored. (defalias 'w3m-cookie-remove #[(domain path name) "\306\211\2050\n@\211\307H \230\203( \310H\f\230\203( \311H \230\203(\312 \"\nA\211\204\306*\207" [w3m-cookies c --dolist-tail-- domain path name nil 1 5 3 delq] 4 (#$ . 3443)]) #@39 Retrieve cookies for DOMAIN and PATH. (defalias 'w3m-cookie-retrieve #[(host path &optional secure) "\306\307\211 \307\211\203t @\211\310H\203*\311\312 \313\f\310H!\"\203*\f B\202m\f\314H\204m\315P\f\316H\230\204I\317\320\f\316H!\321P\"\203m\317\322\320\f\323H!P\"\203m\f\324H\203i\203m\fB\202m\fB A\211\204* \307\211\203\217 @\325 \" A\211\204~*+\207" [cookies expires case-fold-search w3m-cookies c --dolist-tail-- t nil 7 w3m-time-newer-p current-time w3m-time-parse-string 8 "." 1 string-match regexp-quote "\\'" "\\`" 5 2 delq host path secure expire] 6 (#$ . 3715)]) #@29 Parse an absolute HTTP URL. (defalias 'w3m-parse-http-url #[(url) "\306\211\n\30710\310\f \"\311\224\203,\311\224\311\225W\203, \311\224H\312=\203,\313\314\315 \316\"!\2100\2024\210\317 !)\210\316\224\205}\320\321\n\"\322\232\204O\320\321\n\"\323\232\211\205}\315 \324\216\325\320\316\n\"\326\"*\327 @\330A@\206i\331!\320\332\n\"G\333=\203x\334\202|\320\332\n\"$*\207" [split secure url string w3m-url-components-regexp save-match-data-internal nil (error) string-match 9 47 set-match-data nbutlast match-data 4 w3m-string-match-url-components-1 match-string 2 "http" "https" #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] split-string ":" vector string-to-number "80" 5 0 "/"] 7 (#$ . 4339)]) #@30 Secure flag of the HTTP-URL. (defalias 'w3m-http-url-secure #[(http-url) "\301H\207" [http-url 0] 2 (#$ . 5090)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put w3m-http-url-secure speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@28 Host name of the HTTP-URL. (defalias 'w3m-http-url-host #[(http-url) "\301H\207" [http-url 1] 2 (#$ . 5356)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put w3m-http-url-host speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@30 Port number of the HTTP-URL. (defalias 'w3m-http-url-port #[(http-url) "\301H\207" [http-url 2] 2 (#$ . 5616)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put w3m-http-url-port speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@23 Path of the HTTP-URL. (defalias 'w3m-http-url-path #[(http-url) "\301H\207" [http-url 3] 2 (#$ . 5878)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put w3m-http-url-path speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@45 A syntax table for parsing sgml attributes. (defvar w3m-cookie-parse-args-syntax-table (copy-syntax-table emacs-lisp-mode-syntax-table) (#$ . 6133)) (byte-code "\301\302\303#\210\301\304\303#\210\301\305\306#\210\301\307\310#\207" [w3m-cookie-parse-args-syntax-table modify-syntax-entry 39 "\"" 96 123 "(" 125 ")"] 4) (defalias 'w3m-cookie-parse-args #[(str &optional nodowncase) "\306\211\211\211\211r\307\310!q\210\311 \210\312 !\210c\210eb\210m\204\241\313\306w\210`\314\306w\210\2046\315 `\"\210 `{\316\306w\210`f\206D\317\320U\204N\306\202\224\321\306w\210`\211f\206Z\317\322U\204jf\206e\317\323U\203\210T\3241~\325\326!\210`S\327\306w\2100\202\204\210\330\306w\210`{\202\223\331\306w\210\332\306x\210`{\f B\nB\313\306w\210\202\n\237.\207" [val-pos name-pos results value name w3m-cookie-parse-args-syntax-table nil get-buffer-create " *w3m-cookie-parse-temp*" erase-buffer set-syntax-table "; \n " "^ \n =;" downcase-region " \n" 0 61 " \n=" 34 39 (error) forward-sexp 1 "\"" "^ \n" "^;" " " str nodowncase] 6]) #@64 Returns non-nil when the HOST is specified as trusted by user. (defalias 'w3m-cookie-trusted-host-p #[(host) " \306\307\211\211\211\203f@\310\230\203\311\202J@\312\230\203,\313\202J\314@!\315=\203A\316@!\317P\202J\320\316@!\317Q\321\f\"\203Z@G\307\210A\211\204\203\277@\310\230\203x\311\202\243@\312\230\203\205\313\202\243\314@!\315=\203\232\316@!\317P\202\243\320\316@!\317Q\321\f\"\203\263@G\307\210A\211\204k \203\322\n\203\330 \nX\203\330\307\202\330\n\203\330\307 .\207" [w3m-cookie-accept-domains w3m-cookie-reject-domains rlen tlen regexp trusted t nil "." ".*" ".local" "\\`[^\\.]+\\'" string-to-char 46 regexp-quote "\\'" "\\`" string-match reject accept host] 7 (#$ . 7198)]) (defalias 'w3m-cookie-1-acceptable-p #[(host domain) " \230\203\302\207\303P \230\203\302\207\304 \305H\306=\203\" \307\310O\202# !\207" [host domain t "." url-domsuf-cookie-allowed-p 0 46 1 nil] 4]) (defalias 'w3m-cookie-1-set #[(url &rest args) "\306!\307\310\211\211\211\211\211,-\211.\205\363\311\312/\"\205\"\307,\311\313/\"\243\2065.\211.\314H)\311\315/\"\243\311\316/\"\243\311\317/\"\243\206W\320.\211.\321H)!/@ \203{\3221r\323\324\325\310\326 !\"\307#0\202t\210\310\211\203{ \327.\211.\314H)!\204\214\310\202\363\330.\211.\314H) \"\204\2710\307=\204\2710\331=\203\347\332\333\334.\211.\314H) #!\203\347\f\203\316\335\336 \337\f!\"\203\316\340 \n @#\210\341\342\343\344 \345 @\346 A\347\n\350\f\351,&!\202\363\352\353.\211.\314H) #.\207" [url cookie path max-age expires domain w3m-parse-http-url t nil w3m-assoc-ignore-case "secure" "domain" 1 "expires" "max-age" "path" file-name-directory 3 (error) format-time-string "%a %b %d %H:%M:%S %Y GMT" time-add read w3m-cookie-trusted-host-p w3m-cookie-1-acceptable-p ask y-or-n-p format "Accept bad cookie from %s for %s? " w3m-time-newer-p current-time w3m-time-parse-string w3m-cookie-remove w3m-cookie-store w3m-cookie-create :url :domain :name :value :path :expires :secure message "%s tried to set a cookie for domain %s - rejected." secure case-fold-search http-url args w3m-cookie-accept-bad-cookies] 17]) (defalias 'w3m-cookie-2-acceptable-p #[(http-url domain) "\300\207" [nil] 1]) (defalias 'w3m-cookie-2-set #[(url &rest args) "\300\207" [nil] 1]) (defvar w3m-cookie-init nil) #@20 Clear cookie list. (defalias 'w3m-cookie-clear #[nil "\305\306\307!\305\211\205.\n@r q\210 \310\232\203%\307\311\312!\210\313\305\307\"\210))\nA\211\204\f\305*\207" [w3m-cookies buffer --dolist-tail-- w3m-current-url w3m-message-silent nil w3m-list-buffers t "about://cookie/" w3m-history-remove-properties (:forms nil :post-data nil) w3m-reload-this-page] 4 (#$ . 9593) nil]) #@81 Save cookies. When DOMAIN is non-nil, only save cookies whose domains match it. (defalias 'w3m-cookie-save #[(&optional domain) "\306 \306\211\2036 @\f\203\n\307H\f\230\203/\n\310H\203/\311\312\n\310H!\313 \"\203/\nB A\211\204\n*\314 \")\207" [cookies w3m-cookies cookie --dolist-tail-- domain w3m-cookie-file nil 1 7 w3m-time-newer-p w3m-time-parse-string current-time w3m-save-list] 5 (#$ . 9985) nil]) #@36 Save cookies for the current site. (defalias 'w3m-cookie-save-current-site-cookies #[nil "\205C\303!?\205C\30417\305\n \"\306\224\2033\306\224\306\225W\2033 \306\224H\307=\2033\310\311\312 \313\"!\2100\202;\210\314 !)\210\315\316\313\"!\207" [w3m-current-url string w3m-url-components-regexp w3m-url-local-p (error) string-match 9 47 set-match-data nbutlast match-data 4 w3m-string-match-url-components-1 w3m-cookie-save match-string] 5 (#$ . 10411) nil]) #@15 Load cookies. (defalias 'w3m-cookie-load #[nil "?\205\n\302 !\211\207" [w3m-cookies w3m-cookie-file w3m-load-list] 2 (#$ . 10885)]) #@60 Setup cookies. Returns immediataly if already initialized. (defalias 'w3m-cookie-setup #[nil "?\205 \301 \210\302\211\207" [w3m-cookie-init w3m-cookie-load t] 2 (#$ . 11026) nil]) #@40 Save cookies, and reset cookies' data. (defalias 'w3m-cookie-shutdown #[(&optional interactive-p) "\3051\203 \306 \210\307\310 \210\311\312!\211\205\313\n!)0\207\f\203,\314 @ A\"\2022\315\316\317 !\")\207" [w3m-cookie-save-cookies w3m-cookie-init buf err interactive-p (error) w3m-cookie-save nil w3m-cookie-clear get-buffer " *w3m-cookie-parse-temp*" kill-buffer signal message "Error while running w3m-cookie-shutdown: %s" error-message-string] 5 (#$ . 11215) (list t)]) (add-hook 'kill-emacs-hook 'w3m-cookie-shutdown) #@115 Register cookies which correspond to URL. BEG and END should be an HTTP response header region on current buffer. (defalias 'w3m-cookie-set #[(url beg end) "\306 \210\205G \205G\n\205G\212\307\310\311 b\210\312\313\n\307#\205F\314\315!\316\224\203,\316\317\f\320\267\202;\321\202<\322\202<\311\323 \324\"#\210\202,\207" [url beg end data version case-fold-search w3m-cookie-setup t 0 nil re-search-forward "^\\(?:Set-Cookie\\(2\\)?:\\) *\\(.*\\(?:\n[ ].*\\)*\\)\n" match-string 2 1 apply #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 51 1 55)) w3m-cookie-1-set w3m-cookie-2-set w3m-cookie-parse-args nodowncase] 6 (#$ . 11755)]) #@57 Get a cookie field string which corresponds to the URL. (defalias 'w3m-cookie-get #[(url) "\304 \210\305!\211\205\306 \211\307H) \211\310H) \211\311H)#\312\313\n\314\"\211\2050\315\316\n\317#+\207" [url http-url cookies value w3m-cookie-setup w3m-parse-http-url w3m-cookie-retrieve 1 3 0 nil sort #[(x y) "\302HG \302HGW\207" [x y 5] 3] mapconcat #[(cookie) "\302H\211\203\303H\304 Q\207\303H\207" [cookie value 4 3 "="] 3] "; "] 6 (#$ . 12450)]) #@48 Display cookies and enable you to manage them. (defalias 'w3m-cookie #[(&optional no-cache) "\204\f\302\303!\203\f\304\205\305\306 \"\210\307 \207" [w3m-use-cookies no-cache y-or-n-p "Use of cookies is currently disable. Enable? " t w3m-goto-url-new-session "about://cookie/" w3m-history-minimize] 3 (#$ . 12921) "P"]) #@638 Make the html contents to display and to enable you to manage cookies. To delete all cookies associated with amazon.com for example, do it in the following two steps: 1. Mark them `unused' (type `C-c C-c' or press any OK button). Limit to [amazon.com ] <= [ ]regexp [OK] ( )Noop ( )Use all (*)Unuse all ( )Delete unused all [OK] 2. Delete cookies that are marked `unused'. Limit to [amazon.com ] <= [ ]regexp [OK] ( )Noop ( )Use all ( )Unuse all (*)Delete unused all [OK] You can mark cookies on the one-by-one basis of course. The `Limit-to' string is case insensitive and allows a regular expression. (defalias 'w3m-about-cookie #[(url &optional no-decode no-cache post-data &rest args) "\306 \210\307\310\311\312\211\211\211;<\203v\313<\314\"\312=\211>\203u>@=\313=\315\"\211=@\211?\316\267\202Z=A@\202k\f\307\241\210\202k\f\317\320\321\322=A@!#\240\210\202k=A@\323\232\203k\324=@!\nB)>A\211>\204%*\f@G\310U\203\206\312@\202\276\f@\fA\204\222\325!@\312A\211>\203\272>@A\326A\310H\"\203\261A B>A\211>\204\235* \237 \327\267\202\206\n\312B\211>\203\347>@\211B 8\211C\330\307I\210)>A\211>\204\316*\202\206 \312A\211>\203\f>@\211A\211D\330\312I\210)>A\211>\204\365*\202\206 \312A\211>\2031>@\211A\211E\330\307I\210)>A\211>\204*\202\206\n\312B\211>\203X>@\211B 8\211F\330\307I\210)>A\211>\204?* \312A\211>\203\205>@\211A\330H\203|\331A \"\331A@\"@>A\211>\204c*\332\f@\333\fA\205\220\334\335\260c\210 \312A\211>\203/>@A\336A\310H\337A\310H\340A\341H\315A\342H\206\274\343\344A\345H\205\313\346A\345H\347Q\350\351A\352H!\347A\353H\205\341\354A\353H\347QA\355H\205\357\356A\355H\347Q\357A\360H\203\373\361\202\374\362\363\364\365 A\330H\203 \321\202\f\334#\366\364\367 A\330H\203\334\202\321#\370\260c\210 T>A\211>\204\237*\371c\210.\372\207" [regexp cookies dels delete match pos w3m-cookie-setup t 0 (nil) nil split-string "&" "=" #s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("delete" 59 "re-search" 67 "search" 74)) replace-regexp-in-string "[\n ].*" "" w3m-url-decode-string "0" string-to-number regexp-quote string-match #s(hash-table size 4 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("0" 196 "1" 235 "2" 272 "3" 309)) 8 delq "Cookies\n
Cookies
\n
\n

\n
Limit to  <= regexp 
Noop \nUse all \nUnuse all \nDelete unused all \n

\n
    " "

  1. " "

    " 7 "" "
    Cookie:" 3 4 "(no value)" "
    Expires:" "
    Version:" number-to-string 6 1 "
    Domain:" 5 "
    Path:" "
    Secure:" 2 "Yes" "No" "
    Use:" format "Yes" "  " "No" "  
    " "
" "text/html" case-fold-search post-data pair --dolist-tail-- #1=#:val w3m-cookies cookie del #2=#:v #3=#:v #4=#:v #5=#:v] 26 (#$ . 13255)]) (provide 'w3m-cookie)