[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v
From: |
Magnus Henoch |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v |
Date: |
Sun, 26 Nov 2006 12:50:07 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Magnus Henoch <legoscia> 06/11/26 12:50:07
Index: url-http.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/url/url-http.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- url-http.el 23 Nov 2006 08:40:06 -0000 1.44
+++ url-http.el 26 Nov 2006 12:50:07 -0000 1.45
@@ -928,7 +928,7 @@
url-http-response-status))
(url-http-debug "url-http-wait-for-headers-change-function (%s)"
(buffer-name))
- (if (not (bobp))
+ (when (not (bobp))
(let ((end-of-headers nil)
(old-http nil)
(content-length nil))
@@ -940,14 +940,13 @@
(setq end-of-headers t
url-http-end-of-headers 0
old-http t)
- (if (re-search-forward "^\r*$" nil t)
+ (when (re-search-forward "^\r*$" nil t)
;; Saw the end of the headers
- (progn
(url-http-debug "Saw end of headers... (%s)" (buffer-name))
(setq url-http-end-of-headers (set-marker (make-marker)
(point))
end-of-headers t)
- (url-http-clean-headers))))
+ (url-http-clean-headers)))
(if (not end-of-headers)
;; Haven't seen the end of the headers yet, need to wait
@@ -966,7 +965,7 @@
(setq url-http-content-length
(string-to-number (mail-fetch-field "content-length"))))
(widen)))
- (if url-http-transfer-encoding
+ (when url-http-transfer-encoding
(setq url-http-transfer-encoding
(downcase url-http-transfer-encoding)))
@@ -975,7 +974,7 @@
(= url-http-response-status 205))
(url-http-debug "%d response must have headers only (%s)."
url-http-response-status (buffer-name))
- (if (url-http-parse-headers)
+ (when (url-http-parse-headers)
(url-http-activate-callback)))
((string= "HEAD" url-http-method)
;; A HEAD request is _ALWAYS_ terminated by the header
@@ -983,13 +982,13 @@
;; according to section 4.4 of the HTTP/1.1 draft.
(url-http-debug "HEAD request must have headers only (%s)."
(buffer-name))
- (if (url-http-parse-headers)
+ (when (url-http-parse-headers)
(url-http-activate-callback)))
((string= "CONNECT" url-http-method)
;; A CONNECT request is finished, but we cannot stick this
;; back on the free connectin list
(url-http-debug "CONNECT request must have headers only.")
- (if (url-http-parse-headers)
+ (when (url-http-parse-headers)
(url-http-activate-callback)))
((equal url-http-response-status 304)
;; Only allowed to have a header section. We have to handle
@@ -999,7 +998,7 @@
;; fall into the 'being dumb' section and wait for the
;; connection to terminate, which means we'd wait for 10
;; seconds for the keep-alives to time out on some servers.
- (if (url-http-parse-headers)
+ (when (url-http-parse-headers)
(url-http-activate-callback)))
(old-http
;; HTTP/0.9 always signaled end-of-connection by closing the
@@ -1012,13 +1011,12 @@
(url-http-debug "Saw chunked encoding.")
(setq url-http-after-change-function
'url-http-chunked-encoding-after-change-function)
- (if (> nd url-http-end-of-headers)
- (progn
+ (when (> nd url-http-end-of-headers)
(url-http-debug
"Calling initial chunked-encoding for extra data at end of
headers")
(url-http-chunked-encoding-after-change-function
(marker-position url-http-end-of-headers) nd
- (- nd url-http-end-of-headers)))))
+ (- nd url-http-end-of-headers))))
((integerp url-http-content-length)
(url-http-debug
"Got a content-length, being smart about document end.")
@@ -1030,7 +1028,7 @@
;; immediately!
(url-http-debug
"Got 0-length content-length, activating callback immediately.")
- (if (url-http-parse-headers)
+ (when (url-http-parse-headers)
(url-http-activate-callback)))
((> nd url-http-end-of-headers)
;; Have some leftover data
- [Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v, Magnus Henoch, 2006/11/01
- [Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v, Magnus Henoch, 2006/11/02
- [Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v, Magnus Henoch, 2006/11/08
- [Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v, Chong Yidong, 2006/11/10
- [Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v, Magnus Henoch, 2006/11/24
- [Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v,
Magnus Henoch <=
- [Emacs-diffs] Changes to emacs/lisp/url/url-http.el,v, Magnus Henoch, 2006/11/26