mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 08:11:05 -08:00
* 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)
This commit is contained in:
parent
5f5e4ea10c
commit
d7c5e1622f
2 changed files with 15 additions and 5 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
2012-02-10 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
|
* 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 <rgm@gnu.org>
|
2012-02-10 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* url-queue.el (url-queue-retrieve): Doc fix.
|
* url-queue.el (url-queue-retrieve): Doc fix.
|
||||||
|
|
|
||||||
|
|
@ -354,11 +354,14 @@ request.")
|
||||||
;; Parsing routines
|
;; Parsing routines
|
||||||
(defun url-http-clean-headers ()
|
(defun url-http-clean-headers ()
|
||||||
"Remove trailing \r from header lines.
|
"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))
|
(declare (special url-http-end-of-headers))
|
||||||
(goto-char (point-min))
|
(let ((end (marker-position url-http-end-of-headers)))
|
||||||
(while (re-search-forward "\r$" url-http-end-of-headers t)
|
(goto-char (point-min))
|
||||||
(replace-match "")))
|
(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)
|
(defun url-http-handle-authentication (proxy)
|
||||||
(declare (special status success url-http-method url-http-data
|
(declare (special status success url-http-method url-http-data
|
||||||
|
|
@ -1054,7 +1057,7 @@ the end of the document."
|
||||||
(setq url-http-end-of-headers (set-marker (make-marker)
|
(setq url-http-end-of-headers (set-marker (make-marker)
|
||||||
(point))
|
(point))
|
||||||
end-of-headers t)
|
end-of-headers t)
|
||||||
(url-http-clean-headers)))
|
(setq nd (- nd (url-http-clean-headers)))))
|
||||||
|
|
||||||
(if (not end-of-headers)
|
(if (not end-of-headers)
|
||||||
;; Haven't seen the end of the headers yet, need to wait
|
;; Haven't seen the end of the headers yet, need to wait
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue