Mercurial > hg > xemacs-beta
comparison lisp/w3/url-http.el @ 16:0293115a14e9 r19-15b91
Import from CVS: tag r19-15b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:49:20 +0200 |
parents | 9ee227acff29 |
children | 859a2309aef8 |
comparison
equal
deleted
inserted
replaced
15:ad457d5f7d04 | 16:0293115a14e9 |
---|---|
1 ;;; url-http.el --- HTTP Uniform Resource Locator retrieval code | 1 ;;; url-http.el --- HTTP Uniform Resource Locator retrieval code |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1996/12/18 00:38:45 | 3 ;; Created: 1997/01/26 03:56:59 |
4 ;; Version: 1.7 | 4 ;; Version: 1.11 |
5 ;; Keywords: comm, data, processes | 5 ;; Keywords: comm, data, processes |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1993-1996 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 1993-1996 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; Copyright (c) 1996 Free Software Foundation, Inc. | 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. |
10 ;;; | 10 ;;; |
11 ;;; This file is not part of GNU Emacs, but the same permissions apply. | 11 ;;; This file is not part of GNU Emacs, but the same permissions apply. |
12 ;;; | 12 ;;; |
13 ;;; GNU Emacs is free software; you can redistribute it and/or modify | 13 ;;; GNU Emacs is free software; you can redistribute it and/or modify |
14 ;;; it under the terms of the GNU General Public License as published by | 14 ;;; it under the terms of the GNU General Public License as published by |
131 (not (boundp 'proxy-info))) | 131 (not (boundp 'proxy-info))) |
132 nil | 132 nil |
133 (let ((url-basic-auth-storage | 133 (let ((url-basic-auth-storage |
134 url-proxy-basic-authentication)) | 134 url-proxy-basic-authentication)) |
135 (url-get-authentication url nil 'any nil)))) | 135 (url-get-authentication url nil 'any nil)))) |
136 (host (if (boundp 'proxy-info) | 136 (proxy-obj (if (boundp 'proxy-info) |
137 (url-host (url-generic-parse-url proxy-info)) | 137 (url-generic-parse-url proxy-info))) |
138 url-current-server)) | 138 (real-fname (if proxy-obj (url-filename proxy-obj) fname)) |
139 (host (or (and proxy-obj (url-host proxy-obj)) | |
140 url-current-server)) | |
139 (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers)) | 141 (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers)) |
140 nil | 142 nil |
141 (url-get-authentication (or | 143 (url-get-authentication (or |
142 (and (boundp 'proxy-info) | 144 (and (boundp 'proxy-info) |
143 proxy-info) | 145 proxy-info) |
193 url-mime-encoding-string | 195 url-mime-encoding-string |
194 url-mime-language-string | 196 url-mime-language-string |
195 url-mime-accept-string | 197 url-mime-accept-string |
196 (url-http-user-agent-string) | 198 (url-http-user-agent-string) |
197 (or auth "") | 199 (or auth "") |
198 (url-cookie-generate-header-lines url-current-server | 200 (url-cookie-generate-header-lines host |
199 fname | 201 real-fname |
200 (string-match "https" | 202 (string-match "https" |
201 url-current-type)) | 203 url-current-type)) |
202 (or proxy-auth "") | 204 (or proxy-auth "") |
203 (if (and (not no-cache) | 205 (if (and (not no-cache) |
204 (member url-request-method '("GET" nil))) | 206 (member url-request-method '("GET" nil))) |
599 (progn | 601 (progn |
600 (url-process-put process 'url (or proxy-info url)) | 602 (url-process-put process 'url (or proxy-info url)) |
601 (process-kill-without-query process) | 603 (process-kill-without-query process) |
602 (process-send-string process request) | 604 (process-send-string process request) |
603 (url-lazy-message "Request sent, waiting for response...") | 605 (url-lazy-message "Request sent, waiting for response...") |
604 (if url-show-http2-transfer | 606 (setq url-current-content-length nil) |
605 (progn | 607 (make-local-variable 'after-change-functions) |
606 (make-local-variable 'after-change-functions) | 608 (add-hook 'after-change-functions 'url-after-change-function) |
607 (setq url-current-content-length nil) | |
608 (add-hook 'after-change-functions | |
609 'url-after-change-function))) | |
610 (if url-be-asynchronous | 609 (if url-be-asynchronous |
611 (set-process-sentinel process 'url-sentinel) | 610 (set-process-sentinel process 'url-sentinel) |
612 (unwind-protect | 611 (unwind-protect |
613 (save-excursion | 612 (save-excursion |
614 (set-buffer url-working-buffer) | 613 (set-buffer url-working-buffer) |