unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Christopher J. White" <chris@grierwhite.com>
To: 8931@debbugs.gnu.org
Subject: bug#8931: url-http-create-request needs extra CRLF for https
Date: Sat, 24 Sep 2011 00:04:43 -0400	[thread overview]
Message-ID: <20110924000443.00007b72@unknown> (raw)
In-Reply-To: <BANLkTinV6P26jU4Q_9+ApOxNFn15ScmkACeEx0+ME-MBTkyGyA@mail.gmail.com>

There is a tug of war going on here.  

Prior to 100681, the code had no CRLF after url-http-data.  Mark
Hershberger submitted a patch to add the CRLF because without it, POSTs
with content to https urls just hang:

  http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/100681

This change was undone by Nicola Avrutin in 104908:

  http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/104908

The problem was that with no url-http-data, the request ends with a
double CRLF, which apparently confuses some servers.

I recently came across the exact same problem (with url-http.el
without the extra CRL), and Mark's patch above works just fine for me
(also POSTs to https).

I'm thinking the correct solution is to only add the CRLF if there is
http-data:

-    url-http-data))
+    url-http-data (if url-http-data "\r\n")))

...cj

 





  parent reply	other threads:[~2011-09-24  4:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 19:45 bug#8931: 24.0.50; url-http.el terminating HTTP packets with extra carriage return and newline Nicolas Avrutin
2011-07-03 16:04 ` Lars Magne Ingebrigtsen
2011-09-24  4:04 ` Christopher J. White [this message]
2011-09-24 22:58   ` bug#8931: url-http-create-request needs extra CRLF for https Chong Yidong
2011-09-24 18:30 ` bug#8931: May be related to 9592 Christopher J. White

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=20110924000443.00007b72@unknown \
    --to=chris@grierwhite.com \
    --cc=8931@debbugs.gnu.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).