edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [edbrowse-dev] imap and curl
@ 2020-09-02 22:47 Karl Dahlke
  0 siblings, 0 replies; only message in thread
From: Karl Dahlke @ 2020-09-02 22:47 UTC (permalink / raw)
  To: edbrowse-dev

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-02 22:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 22:47 [edbrowse-dev] imap and curl Karl Dahlke

edbrowse-dev - development list for edbrowse

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/edbrowse-dev

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 edbrowse-dev edbrowse-dev/ http://inbox.vuxu.org/edbrowse-dev \
		edbrowse-dev@edbrowse.org
	public-inbox-index edbrowse-dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.edbrowse.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git