[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107229: * url-http.el (url-http-clea
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107229: * url-http.el (url-http-clean-headers): Return the number of |
Date: |
Fri, 10 Feb 2012 12:36:42 +0100 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107229
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Fri 2012-02-10 12:36:42 +0100
message:
* url-http.el (url-http-clean-headers): Return the number of
removed characters.
(url-http-wait-for-headers-change-function): Adjust end position
after cleaning the headers. (Bug#10768)
modified:
lisp/url/ChangeLog
lisp/url/url-http.el
=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog 2012-02-10 03:23:47 +0000
+++ b/lisp/url/ChangeLog 2012-02-10 11:36:42 +0000
@@ -1,3 +1,10 @@
+2012-02-10 Andreas Schwab <address@hidden>
+
+ * url-http.el (url-http-clean-headers): Return the number of
+ removed characters.
+ (url-http-wait-for-headers-change-function): Adjust end position
+ after cleaning the headers. (Bug#10768)
+
2012-02-10 Glenn Morris <address@hidden>
* url-queue.el (url-queue-retrieve): Doc fix.
=== modified file 'lisp/url/url-http.el'
--- a/lisp/url/url-http.el 2012-02-08 00:04:42 +0000
+++ b/lisp/url/url-http.el 2012-02-10 11:36:42 +0000
@@ -354,11 +354,14 @@
;; Parsing routines
(defun url-http-clean-headers ()
"Remove trailing \r from header lines.
-This allows us to use `mail-fetch-field', etc."
+This allows us to use `mail-fetch-field', etc.
+Return the number of characters removed."
(declare (special url-http-end-of-headers))
- (goto-char (point-min))
- (while (re-search-forward "\r$" url-http-end-of-headers t)
- (replace-match "")))
+ (let ((end (marker-position url-http-end-of-headers)))
+ (goto-char (point-min))
+ (while (re-search-forward "\r$" url-http-end-of-headers t)
+ (replace-match ""))
+ (- end url-http-end-of-headers)))
(defun url-http-handle-authentication (proxy)
(declare (special status success url-http-method url-http-data
@@ -1054,7 +1057,7 @@
(setq url-http-end-of-headers (set-marker (make-marker)
(point))
end-of-headers t)
- (url-http-clean-headers)))
+ (setq nd (- nd (url-http-clean-headers)))))
(if (not end-of-headers)
;; Haven't seen the end of the headers yet, need to wait
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107229: * url-http.el (url-http-clean-headers): Return the number of,
Andreas Schwab <=