edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: edbrowse-dev@edbrowse.org
Subject: [edbrowse-dev] imap and curl
Date: Wed, 02 Sep 2020 18:47:52 -0400	[thread overview]
Message-ID: <20200802184752.eklhad@comcast.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 2505 bytes --]

This is for you curl experts, or anyone who wants to debug something.
Though I kinda think it's a curl bug.
If so we should report it.

I've only seen this on imap, and only comcast imap,
because the envelope is sometimes spread across two lines.
gmail never does that.
curl is suppose to call our callback function with each chunk of data, and we put those chunks together,
and there is your web page or mail message or envelope or whatever it is.
All good, but curl only calls our callback function on the first line of the envelope and not the second.
Here is part of a run with db4.
The verbose gives us all the curl traffic in and out.
You'll see both lines there, but, I have a debug print on the length of data in the callback function,
and you'll see the length of the first line and not the second.

Here's an envelope on one line, as most of them are.

curl>
A015 FETCH 4 ALL
curl<
* 4 FETCH (FLAGS ($HasNoAttachment) INTERNALDATE "01-Sep-2020 22:08:38 +0000" RFC822.SIZE 23730 ENVELOPE ("1 Sep 2020 22:00:31 +0000" "Wendy, I hope you're ready..." (("Publishers Clearing House" NIL "PublishersClearingHouse" "e.superprize.pch.com")) (("Publishers Clearing House" NIL "PublishersClearingHouse" "e.superprize.pch.com")) (("Publishers Clearing House" NIL "PublishersClearingHouse" "e.superprize.pch.com")) (("Wendy Dahlke" NIL "kwnre" "comcast.net")) NIL NIL NIL "<543.22827028370.202009012200313999957.0062470136@e.superprize.pch.com>"))
callback 555
A015 OK Fetch completed (0.001 + 0.000 secs).

Here's an envelope across two lines, with just one callback.

curl>
A016 FETCH 5 ALL
curl<
* 5 FETCH (FLAGS (\Seen $HasNoAttachment) INTERNALDATE "26-Aug-2020 21:14:43 +0000" RFC822.SIZE 41510 ENVELOPE ("26 Aug 2020 21:03:04 +0000" {77}
callback 147
=?utf-8?B?4p2XIE5vIGZ1cnRoZXIgYXR0ZW1wdHMgd2lsbCBiZSBtYWRl?= =?utf-8?B?Li4u?= (("Publishers Clearing House" NIL "PublishersClearingHouse" "e.superprize.pch.com")) (("Publishers Clearing House" NIL "PublishersClearingHouse" "e.superprize.pch.com")) (("Publishers Clearing House" NIL "PublishersClearingHouse" "e.superprize.pch.com")) (("Wendy Dahlke" NIL "kwnre" "comcast.net")) NIL NIL NIL "<543.22761811853.202008262102597548748.0037250599@e.superprize.pch.com>"))
A016 OK Fetch completed (0.001 + 0.000 secs).

Without the second half of the envelope there is no subject, no from, basically pretty useless.
I literally have to read the email to know what the hell it is.

Any help appreciated.

Karl Dahlke

                 reply	other threads:[~2020-09-02 22:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=20200802184752.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=edbrowse-dev@edbrowse.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.
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 NNTP newsgroup(s).