# HG changeset patch # User Magnus Henoch # Date 1205093759 0 # Node ID c8be70dde05c715c881878960f092e1f590e0318 # Parent 387ed7be028f2ef013ab5aa7e8282fc186c35d2f (url-http-chunked-encoding-after-change-function): Remove superfluous CRLF at end of file. (bug #42) diff -r 387ed7be028f -r c8be70dde05c lisp/url/url-http.el --- a/lisp/url/url-http.el Sun Mar 09 19:58:55 2008 +0000 +++ b/lisp/url/url-http.el Sun Mar 09 20:15:59 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)