comparison lisp/w3/url-http.el @ 82:6a378aca36af r20-0b91

Import from CVS: tag r20-0b91
author cvs
date Mon, 13 Aug 2007 09:07:36 +0200
parents 9ee227acff29
children 364816949b59
comparison
equal deleted inserted replaced
81:ebca3d831cea 82:6a378aca36af
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/15 15:55:48
4 ;; Version: 1.7 4 ;; Version: 1.10
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 (host (or (and (boundp 'proxy-info)
137 (url-host (url-generic-parse-url proxy-info)) 137 (url-host (url-generic-parse-url proxy-info)))
138 url-current-server)) 138 url-current-server))
139 (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers)) 139 (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers))
140 nil 140 nil
141 (url-get-authentication (or 141 (url-get-authentication (or
142 (and (boundp 'proxy-info) 142 (and (boundp 'proxy-info)
143 proxy-info) 143 proxy-info)
599 (progn 599 (progn
600 (url-process-put process 'url (or proxy-info url)) 600 (url-process-put process 'url (or proxy-info url))
601 (process-kill-without-query process) 601 (process-kill-without-query process)
602 (process-send-string process request) 602 (process-send-string process request)
603 (url-lazy-message "Request sent, waiting for response...") 603 (url-lazy-message "Request sent, waiting for response...")
604 (if url-show-http2-transfer 604 (setq url-current-content-length nil)
605 (progn 605 (make-local-variable 'after-change-functions)
606 (make-local-variable 'after-change-functions) 606 (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 607 (if url-be-asynchronous
611 (set-process-sentinel process 'url-sentinel) 608 (set-process-sentinel process 'url-sentinel)
612 (unwind-protect 609 (unwind-protect
613 (save-excursion 610 (save-excursion
614 (set-buffer url-working-buffer) 611 (set-buffer url-working-buffer)