GNU bug report logs - #13598
24.3.50; url-http.el doesn't correctly parse headers when they are sent line-by-line

Previous Next

Package: emacs;

Reported by: coroa <at> online.de (Jonas Hoersch)

Date: Thu, 31 Jan 2013 18:11:01 UTC

Severity: normal

Merged with 14372

Found in versions 24.3, 24.3.50

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: coroa <at> online.de (Jonas Hörsch)
To: 13598 <at> debbugs.gnu.org
Subject: bug#13598: 24.3.50; url-http.el doesn't correctly parse headers when they are sent line-by-line
Date: Thu, 07 Feb 2013 19:13:40 +0100
On Thu, Jan 31 2013, Jonas Hoersch wrote:

> changing the regex in (re-search-forward "^\r*$" nil t) to "^\r*\n"
> solves the problem for me, but i'm unsure about what i might possibly be
> breaking that way.

i'm positive now, that changing the regex to "^\r+$" is the way to go.

i would be happy to supply a patch, but i understand it is probably to
trivial a matter to justify going through the legal requirements first.

the following advice can serve as a hotfix:

(defadvice url-http-wait-for-headers-change-function (around
                                                      url-http-properly-wait-for-headers-advice
                                                      activate)
  (save-excursion
    (goto-char (point-min))
    (if (re-search-forward "^\r+$" nil t)
        ad-do-it
      (url-http-debug "Incomplete headers...: %d" (point-max)))))





This bug report was last modified 11 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.