From: James Stout <james.wolf.stout@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 16345@debbugs.gnu.org
Subject: bug#16345: 24.3; url-http sometimes closes connection prematurely
Date: Mon, 28 Dec 2015 10:50:44 -0800 [thread overview]
Message-ID: <CAJGMLzxVk3Qu3ba+e3Umej6cEaJghDhEHB3-o=mUd7g7A4c=+g@mail.gmail.com> (raw)
In-Reply-To: <87d1tqv4y8.fsf@gnus.org>
[-- Attachment #1.1: Type: text/plain, Size: 756 bytes --]
This is the first Emacs patch I've ever sent; let me know if I'm doing it
wrong.
On Mon, Dec 28, 2015 at 9:49 AM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> James Stout <james.wolf.stout@gmail.com> writes:
>
> > I'm suggesting the following change:
> >
> > Before: (if (re-search-forward "^\r*$" nil t) (url-http-debug "Saw end of
> > trailers..."))
> > After: (if (re-search-forward "^\r?\n" nil t) (url-http-debug "Saw end of
> > trailers..."))
> >
> > This is based purely on my reading of the spec; this wasn't actually a
> problem
> > I ran into (and it's just going to affect a debug message).
>
> Can you send a patch for the change?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
[-- Attachment #1.2: Type: text/html, Size: 1383 bytes --]
[-- Attachment #2: 0001-Fixed-regular-expression-for-end-of-HTTP-trailers-to.patch --]
[-- Type: application/octet-stream, Size: 891 bytes --]
From ab2c4b31a6619dd0dbdcaab55e32e2b6a80826b4 Mon Sep 17 00:00:00 2001
From: James Stout <james.wolf.stout@gmail.com>
Date: Mon, 28 Dec 2015 10:47:31 -0800
Subject: [PATCH] Fixed regular expression for end of HTTP trailers to match
spec.
---
lisp/url/url-http.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 916f263..e5c2c3a 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1067,7 +1067,7 @@ the end of the document."
(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)
+ (if (re-search-forward "^\r?\n" nil t)
(url-http-debug "Saw end of trailers..."))
(if (url-http-parse-headers)
(url-http-activate-callback))))))))))
--
2.6.2
next prev parent reply other threads:[~2015-12-28 18:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-04 21:01 bug#16345: 24.3; url-http sometimes closes connection prematurely James Stout
2014-01-04 23:46 ` Glenn Morris
2014-01-05 19:59 ` James Stout
2015-12-25 20:38 ` Lars Ingebrigtsen
2015-12-27 23:28 ` James Stout
2015-12-28 17:49 ` Lars Ingebrigtsen
2015-12-28 18:50 ` James Stout [this message]
2015-12-28 19:50 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJGMLzxVk3Qu3ba+e3Umej6cEaJghDhEHB3-o=mUd7g7A4c=+g@mail.gmail.com' \
--to=james.wolf.stout@gmail.com \
--cc=16345@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).