edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] download background
@ 2015-01-10  8:37 Karl Dahlke
  2015-01-10  9:43 ` Chris Brannon
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2015-01-10  8:37 UTC (permalink / raw)
  To: Edbrowse-dev

Further exploration of download in background fron a secure site:
I did finally get it to work, but I had to free all curl resources,
global cleanup, global init, and reset all the curl attributes
from start to the point of the https download.
But ... after the download, the child process was so corrupted
it couldn't even exit without seg fault.
I looked in curl.h and it says very clearly that
the global init function should be called "exactly once",
and the same for global cleanup.
Clearly I wasn't doing that, so all bets are off!
But that is the only way to get the secure download to work
in the child process.
I think this is a problem we can't solve or work around.
I also think it is primarily in ssl.
Nobody else seems to have this problem,
and I am on an older version of openssl,
so instead of spinning my wheels,
I think I should just document that download in background from secure sites
may not work on openssl version less than 1.0.1g,
and move on to other projects.
We've done this in other respects;
edbrowse just doesn't work with curl version < 7.26, or with pcre < something.
So I think this is reasonable, if indeed the problem is in ssl,
and fixed in recent versions of ssl.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Edbrowse-dev] download background
  2015-01-10  8:37 [Edbrowse-dev] download background Karl Dahlke
@ 2015-01-10  9:43 ` Chris Brannon
  2015-01-10 15:11   ` Adam Thompson
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Brannon @ 2015-01-10  9:43 UTC (permalink / raw)
  To: Edbrowse-dev

Karl Dahlke <eklhad@comcast.net> writes:

> I think I should just document that download in background from secure sites
> may not work on openssl version less than 1.0.1g,

Yes, that does seem like the best option here.

Also, thanks for the fixes yesterday.

-- Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Edbrowse-dev] download background
  2015-01-10  9:43 ` Chris Brannon
@ 2015-01-10 15:11   ` Adam Thompson
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Thompson @ 2015-01-10 15:11 UTC (permalink / raw)
  To: Chris Brannon; +Cc: Edbrowse-dev

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

On Sat, Jan 10, 2015 at 01:43:54AM -0800, Chris Brannon wrote:
> Karl Dahlke <eklhad@comcast.net> writes:
> 
> > I think I should just document that download in background from secure sites
> > may not work on openssl version less than 1.0.1g,
> 
> Yes, that does seem like the best option here.

Agreed, it sounds like an ssl bug.

The only way I can think to avoid this problem is to do something like run all
network stuff in a separate process (or thread),
then for background downloads you don't display progress,
whereas for foreground downloads you do.
You could query the downloader for the file type to decide what to do with it, i.e.
if it's text or html then it downloads in foreground automatically,
otherwise we display a prompt.
However this design is more complex than we need right now (though when we end
up with asynchronous js etc, which we'll need some day because our current
timer stuff just won't work in todays increasingly real-time web for much
longer) we'll probably have to revisit this.

Also, thanks for adding the toggle command for background downloads.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Edbrowse-dev] download background
@ 2015-01-09 21:01 Karl Dahlke
  0 siblings, 0 replies; 4+ messages in thread
From: Karl Dahlke @ 2015-01-09 21:01 UTC (permalink / raw)
  To: Edbrowse-dev

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

Ok I made some progress on this, sort of - well maybe not.
There is now a bg (toggle) command to have downloads
run in background or foreground.
You get the progress dots in foreground.
Put bg in your init function if you normally want background downloads.
But ... https background still doesn't work.
It's a new error message this time.

SSL connect error in libcurl: A PKCS #11 module returned CKR_DEVICE_ERROR, indicating that a problem has occurred with the token or slot.

I wonder if I have to close down curl completely in child, then re initialize it.
It just shouldn't be this hard.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-10 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10  8:37 [Edbrowse-dev] download background Karl Dahlke
2015-01-10  9:43 ` Chris Brannon
2015-01-10 15:11   ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2015-01-09 21:01 Karl Dahlke

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