edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev]  Rebundle
Date: Fri, 25 Dec 2015 10:10:32 -0500	[thread overview]
Message-ID: <20151125101032.eklhad@comcast.net> (raw)
In-Reply-To: <alpine.LRH.2.03.1512231602020.2850@carhart.net>

> Here's what I have for the native implementation of a javascript function.

Kevin I finally got round to looking at this.

You should free the strings created by js_c_str() (memory leak).
You may also have to free serverData after it is converted to a js string.
It too is allocated.
javatext should be initialized to null else
the last line will seg fault when httpConnect fails.
Not clear what happens for other error codes besides 200.

That said, it's a great and simple implementation of
a synchronous http call.
And with my latest commits,
it will use the proxies and agent and cookie jar in the config file.
But it will not use transient or new cookies, like session cookies,
that might be produced by the initial web page fetch from edbrowse,
and it won't until we merge things together and there is but one instance of curl running.

Next question is could we spin off the http in the background,
which edbrowse indeed can do,
and how that would fit together,
and I'll think about that one,
but meantime I do think some is better than none,
and it might be worth implementing this synchronous routine,
in 30 lines of code, so more websites work,
and then work on the asynchronous model later.
But that's just my opinion / philosophy,
which is not always right.
A website indeed could work, that didn't work before,
but you may have to wait a few seconds for the http to return serially -
well I'd make that tradeoff for now.

anyways if you want to send me a revised function, or patch, or whatever...

Karl Dahlke

  parent reply	other threads:[~2015-12-25 15:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 23:13 Karl Dahlke
2015-12-23 23:17 ` Kevin Carhart
2015-12-24  0:01   ` Kevin Carhart
2015-12-24  0:04     ` Kevin Carhart
2015-12-24  0:17       ` Karl Dahlke
2015-12-24  0:46         ` Kevin Carhart
2015-12-25 15:10       ` Karl Dahlke [this message]
2015-12-26  8:44         ` [Edbrowse-dev] Rebundle / One program # processes Kevin Carhart
2015-12-26 15:56           ` Karl Dahlke
2015-12-27  7:54             ` Adam Thompson
2015-12-27  9:18               ` [Edbrowse-dev] response headers and body? Kevin Carhart
2015-12-27 13:38                 ` Karl Dahlke
2015-12-27 21:03                   ` Kevin Carhart

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=20151125101032.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /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).