discussion and development of piem
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: piem@inbox.kyleam.com
Subject: [PATCH 1/5] Use url-http-end-of-headers move to payload
Date: Sun, 16 Aug 2020 21:33:39 -0400	[thread overview]
Message-ID: <20200817013343.15615-2-kyle@kyleam.com> (raw)
In-Reply-To: <20200817013343.15615-1-kyle@kyleam.com>

 piem.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/piem.el b/piem.el
index 6a3c2b3..bcbec78 100644
--- a/piem.el
+++ b/piem.el
@@ -33,6 +33,8 @@ (require 'rfc2047)
 (require 'subr-x)
 (require 'url)
+(defvar url-http-end-of-headers)
 ;;;; Options
@@ -397,7 +399,7 @@ (defun piem--inject-thread-callback (status mid message-only)
         (let ((error-status (plist-get status :error)))
           (if error-status
               (signal (car error-status) (cdr error-status))
-            (search-forward "\n\n")
+            (goto-char (1+ url-http-end-of-headers))
             (delete-region (point-min) (point))
             (unless message-only
               (unless (= 0 (call-process-region nil nil "gunzip" nil t))

  reply	other threads:[~2020-08-17  1:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17  1:33 [PATCH 0/5] b4: Try to download thread from piem-inboxes URL Kyle Meyer
2020-08-17  1:33 ` Kyle Meyer [this message]
2020-08-17  1:33 ` [PATCH 2/5] Move "has gunzip?" check to helper Kyle Meyer
2020-08-17  1:33 ` [PATCH 3/5] Extract logic from inject-thread-callback Kyle Meyer
2020-08-17  1:33 ` [PATCH 4/5] b4: Use a clearer variable name Kyle Meyer
2020-08-17  1:33 ` [PATCH 5/5] b4: Try to download thread from piem-inboxes URL Kyle Meyer

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:

  List information: https://git.kyleam.com/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200817013343.15615-2-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \


* 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


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).