Note that there are some explanatory texts on larger screens.

plurals
  1. PONode.js (node-webkit) error using http.get for rss feed, HPE_INVALID_CONSTANT
    primarykey
    data
    text
    <p>I'm working on an RSS aggregator via node-webkit, and I've stumbled upon an issue where a seemingly random volume of my requests (code below) will fail with any of the following errors: HPE_INVALID_CONSTANT, ETIMEDOUT, EAGAIN, and HPE_INVALID_HEADER_TOKEN. I've sorted those in regularity of occurrence.</p> <p>I made a test.html file with as much relevance as possible. Just plug in a large volume of web page urls into <code>httpList</code> and it will work. though, be careful what URLs you use, you wouldn't want to crash someones server! A list of around 56 seems to work for causing the errors.</p> <p>As an aside, this is really hard to reproduce, meaning its gotta be something I can change on my end. Sometimes the same URL will fail, while on the next pass it will work. Also I have had URLs that have failed, that were indeed accessible (I opened them up in chrome no problem).</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;HTTP Get test&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;script&gt; var httpList = []; var fromUrl = function(stringUrl) { var http = require('http'); var url = require("url"); var urlData = url.parse(stringUrl); var parser = window.document.createElement('a'); parser.href = stringUrl; var options = { host: urlData.host, path: urlData.path + urlData.search + urlData.hash }; var httpResponse = function(response) { response.setEncoding('utf8'); request.setSocketKeepAlive(true); var str = ''; response.on('data', function(chunk) { str += chunk; }); response.on('end', function() { request.setSocketKeepAlive(false); console.log("url",stringUrl,"was successfully parsed"); }); } var request = http.request(options, httpResponse) request.on('error', function(e) { if (e.code === "ENOTFOUND") { console.error("The feed", stringUrl, "could not be fetched.") } else { console.log(e, e.message, stringUrl); } }); request.end(); }; for(var i=0;i&lt;httpList.length;i++) { fromUrl(httpList[i]); } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload