GNU bug report logs -
#14372
24.3; url package http end of headers false positive
Previous Next
Reported by: Ben Anhalt <ben.anhalt <at> gmail.com>
Date: Wed, 8 May 2013 23:05:01 UTC
Severity: normal
Merged with 13598
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14372 in the body.
You can then email your comments to 14372 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14372
; Package
emacs
.
(Wed, 08 May 2013 23:05:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ben Anhalt <ben.anhalt <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 08 May 2013 23:05:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In url-http.el in url-http-wait-for-headers-change-function the regular
expression for detecting the end of HTTP headers is "^\r*$" which can
result in false positives if a partial response (with more headers to
come) is received that ends in a newline. That is, "HTTP/1.1 200
OK\r\nSome-header: foo\r\n" matches at the end as an empty line even
though there is no way to tell if more headers will arrive.
It needs to detect a line that contains nothing but "\r", so a RE like
"^\r+$" or simply "^\r$" would be more appropriate.
In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
of 2013-04-14 on chindi10, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description: Ubuntu 12.04.2 LTS
Configured using:
`configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
'--localstatedir=/var/lib' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
'--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
'--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Wformat-security
-Werror=format-security -Wall' 'LDFLAGS=-Wl,-Bsymbolic-functions
-Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
shell-dirtrack-mode: t
elisp-slime-nav-mode: t
eldoc-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
global-rainbow-delimiters-mode: t
rainbow-delimiters-mode: t
which-function-mode: t
show-paren-mode: t
winner-mode: t
global-auto-revert-mode: t
my-keys-minor-mode: t
ido-everywhere: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<return> y M-x r e v e r <tab> t <tab> <return> y C-x
k <return> C-x C-f . a u <return> C-x k <return> C-x
k <return> C-x o C-x 0 M-x r e p <tab> o r <tab> <
return>
Recent messages:
465
Sending...
Save auth info to file ~/.authinfo? [y/n/N/e/?] y
Saved new authentication information to ~/.authinfo
Sending email
Sending email done
Sending...done
Making completion list...
Revert buffer from file /home/ben/.emacs.d/custom.el? (y or n) y
Making completion list...
Load-path shadows:
/home/ben/.emacs.d/elpa/markdown-mode-20130328.918/markdown-mode hides /usr/share/emacs24/site-lisp/emacs-goodies-el/markdown-mode
/usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/home/ben/.emacs.d/custom hides /usr/share/emacs/24.3/lisp/custom
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell
/home/ben/.emacs.d/elpa/magit-20130502.1609/.dir-locals hides /usr/share/emacs/24.3/lisp/gnus/.dir-locals
Features:
(rfc2104 rmail mail-hist mailalias epa-mail epa derived epg epg-config
apropos dired tramp-cache tramp tramp-compat tramp-loaddefs gnutls
smtpmail cus-edit cus-start cus-load wid-edit shadow sort mail-extr
emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader sendmail python-mode info-look info
compile visual-regexp pcase hippie-exp edebug pp thingatpt misearch
multi-isearch jka-compr mail-utils timezone parse-time pcmpl-unix shell
debug ace-jump-mode network-stream starttls url-cache url-http tls
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-auth specify
json url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util url-parse auth-source eieio gnus-util
mm-util mail-prsvr password-cache url-vars mailcap add-log vc-git
elisp-slime-nav help-mode etags eldoc zenburn-theme server undo-tree
diff rainbow-delimiters which-func imenu paren winner autorevert
ob-python org byte-opt warnings bytecomp byte-compile cconv ob-tangle
ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys
org-pcomplete pcomplete comint ansi-color ring org-list org-faces
org-entities noutline outline org-version ob-emacs-lisp ob org-compat
org-macs ob-eval org-loaddefs format-spec find-func cal-menu easymenu
calendar cal-loaddefs uniquify advice help-fns advice-preload
key-bindings edmacro kmacro setup-package ace-jump-mode-autoloads
coffee-mode-autoloads elisp-slime-nav-autoloads expand-region-autoloads
fill-column-indicator-autoloads flymake-cursor-autoloads
js2-mode-autoloads jump-char-autoloads lua-mode-autoloads
magit-autoloads mark-multiple-autoloads markdown-mode-autoloads
php-mode-autoloads rainbow-delimiters-autoloads restclient-autoloads
slime-autoloads undo-tree-autoloads visual-regexp-autoloads finder-inf
zenburn-theme-autoloads package setup-hippie ido cl-macs gv cl cl-lib
emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14372
; Package
emacs
.
(Wed, 08 May 2013 23:09:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 14372 <at> debbugs.gnu.org (full text, mbox):
Ben Anhalt wrote:
> In url-http.el in url-http-wait-for-headers-change-function the regular
> expression for detecting the end of HTTP headers is "^\r*$" which can
> result in false positives if a partial response (with more headers to
> come) is received that ends in a newline. That is, "HTTP/1.1 200
> OK\r\nSome-header: foo\r\n" matches at the end as an empty line even
> though there is no way to tell if more headers will arrive.
>
> It needs to detect a line that contains nothing but "\r", so a RE like
> "^\r+$" or simply "^\r$" would be more appropriate.
Thanks for the report. I believe this is already fixed in Emacs trunk:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13598
> In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
> of 2013-04-14 on chindi10, modified by Debian
Forcibly Merged 13598 14372.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 08 May 2013 23:09:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14372
; Package
emacs
.
(Wed, 08 May 2013 23:14:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 14372 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Yes, it is the same bug. I did not see that one when searching. Thank you
for the reply.
Ben
On Wed, May 8, 2013 at 6:08 PM, Glenn Morris <rgm <at> gnu.org> wrote:
> Ben Anhalt wrote:
>
> > In url-http.el in url-http-wait-for-headers-change-function the regular
> > expression for detecting the end of HTTP headers is "^\r*$" which can
> > result in false positives if a partial response (with more headers to
> > come) is received that ends in a newline. That is, "HTTP/1.1 200
> > OK\r\nSome-header: foo\r\n" matches at the end as an empty line even
> > though there is no way to tell if more headers will arrive.
> >
> > It needs to detect a line that contains nothing but "\r", so a RE like
> > "^\r+$" or simply "^\r$" would be more appropriate.
>
> Thanks for the report. I believe this is already fixed in Emacs trunk:
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13598
>
> > In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
> > of 2013-04-14 on chindi10, modified by Debian
>
--
Ben Anhalt
ben.anhalt <at> gmail.com
Mi parolas Esperante.
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 06 Jun 2013 11:24:04 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Blazej Adamczyk <blazej.adamczyk <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 26 Feb 2014 16:45:05 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 31 Mar 2014 11:24:04 GMT)
Full text and
rfc822 format available.
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.