From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-12v.sys.comcast.net (resqmta-ch2-12v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:44]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 8932777D0D for ; Fri, 25 Dec 2015 07:10:18 -0800 (PST) Received: from resomta-ch2-03v.sys.comcast.net ([69.252.207.99]) by resqmta-ch2-12v.sys.comcast.net with comcast id xr9B1r00329Cfhx01rAZiM; Fri, 25 Dec 2015 15:10:33 +0000 Received: from eklhad ([IPv6:2601:405:4001:e487:21e:4fff:fec2:a0f1]) by resomta-ch2-03v.sys.comcast.net with comcast id xrAZ1r0082MDcd701rAZzG; Fri, 25 Dec 2015 15:10:33 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke References: <20151122181357.eklhad@comcast.net> User-Agent: edbrowse/3.6.0+ Date: Fri, 25 Dec 2015 10:10:32 -0500 Message-ID: <20151125101032.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1451056233; bh=ynqlPKspvf1U8Skas/zsZZ4G/F+aqjk1UvQrAVskD24=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=pPbQ2iRDDv47RwkbhwYqDRXsoCMM3jzoeinhOXXKEmeOZRsYK2QbT5SczymRM3MHV 7YcuS5QJbJRg2Z/zt8WuUYgS1SfC4pCbPWeMtYtz9BxVtBdOp+86D46rvgJVXCauj8 zmRe6lHBQqJFLnnfaiTVaxqmpmLS3iU/MnTvHwjPDt4j/ycms5KTW+5NpBwTRpF/w5 TD8K8CnfSXMKF6/aP2wuoFLNZlZuSodkx7gi1o9bkzZWLboU88c//eitAo30X7brr2 rjrsVc9N5LSLH3m0Vh6fu/XrImG84FTY3a8CEijBuU9vRMx4yFzdBwe71VIqUwQIUz qVE89nXtxTrGw== Subject: [Edbrowse-dev] Rebundle X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2015 15:10:18 -0000 > 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