# HG changeset patch # User Chong Yidong # Date 1207356541 0 # Node ID 09d6e55e44765b195119b203f9516e23e9ba47de # Parent 1894494e0ee96e92dec513119b68a48ef6ca89c1 (url-http-chunked-encoding-after-change-function): Remove superfluous CRLF at end of file. (bug #42) diff -r 1894494e0ee9 -r 09d6e55e4476 lisp/url/url-http.el --- a/lisp/url/url-http.el Sat Apr 05 00:48:51 2008 +0000 +++ b/lisp/url/url-http.el Sat Apr 05 00:49:01 2008 +0000 @@ -948,7 +948,11 @@ (url-http-debug "Saw end of stream chunk!") (setq read-next-chunk nil) (url-display-percentage nil nil) - (goto-char (match-end 1)) + ;; Every chunk, even the last 0-length one, is + ;; terminated by CRLF. Skip it. + (when (looking-at "\r?\n") + (url-http-debug "Removing terminator of last chunk") + (delete-region (match-beginning 0) (match-end 0))) (if (re-search-forward "^\r*$" nil t) (url-http-debug "Saw end of trailers...")) (if (url-http-parse-headers)