<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Yabfog</title>
	<atom:link href="http://yabfog.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://yabfog.com/blog</link>
	<description>Yet another blog full of gas</description>
	<lastBuildDate>Mon, 29 Apr 2013 18:02:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
<cloud domain='yabfog.com' port='80' path='/blog/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Fargo as a Fluid App</title>
		<link>http://yabfog.com/blog/2013/04/29/fargo-as-a-fluid-app</link>
		<comments>http://yabfog.com/blog/2013/04/29/fargo-as-a-fluid-app#comments</comments>
		<pubDate>Mon, 29 Apr 2013 18:02:10 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[fargo]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[outlining]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778692</guid>
		<description><![CDATA[I thought it would be cool to have Fargo as a separate Fluid App. For those who don't know, Fluid let's you make a web app into what feels like a regular desktop app (for Mac OS X only). For &#8230; <a href="http://yabfog.com/blog/2013/04/29/fargo-as-a-fluid-app">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I thought it would be cool to have <a href="http://smallpicture.com/fargoDocs.html">Fargo</a> as a separate <a href="http://fluidapp.com/">Fluid App</a>. For those who don't know, Fluid let's you make a web app into what feels like a regular desktop app (for Mac OS X only). For me at least, this will make it easier to find Fargo among my many open windows and browser tabs -- now it's got it's own icon in my Dock and it's own spot in the Cmd-Tab switcher. It makes Fargo feel like the first-class Mac App that it is.</p>
<p>Here my switcher now -- there's our beloved dino!<br />
<img src="https://dl.dropboxusercontent.com/u/1665/screencaps/2013-04-29-fargo-fluid.png" alt="enter image description here" /></p>
<p>If you want to set this up too, know that I had to jump through a few hoops to get it to work. The difficulty appeared to be a by-product of Fargo needing to get my authorization to connect to my Dropbox account (in technical terms, OAuth is a pain in the ass). The workaround was to get this authorization before creating the Fluid App.</p>
<ol>
<li>Open Safari</li>
<li>Go to http://fargo.io to launch Fargo</li>
<li>Follow the prompts to authorize Fargo to connect to your Dropbox account</li>
<li>Close Safari (optional)</li>
<li>Create your Fargo Fluid App (follow the instructions on http://fluidapp.com/)</li>
<li>Launch your new Fargo Fluid App</li>
</ol>
<h2>Why did that work?!</h2>
<p>I'm using a free version of Fluid (for now -- still kicking the tires). The free version doesn't have separate cookie storage -- it shares it with Safari (Fluid is built on Apple's WebKit, like Safari). So, by setting everything up in Safari first, Fluid was able to piggyback on that setup when it created the Fargo app. Neat trick -- but not a long term solution. For example, I want to pay for the full version of Fluid (to support the developer), but I suspect this trick won't work in the full version.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2013/04/29/fargo-as-a-fluid-app/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://yabfog.com/blog//dl.dropboxusercontent.com/u/1665/screencaps/2013-04-29-fargo-fluid.png" />
		<media:content url="http://yabfog.com/blog//dl.dropboxusercontent.com/u/1665/screencaps/2013-04-29-fargo-fluid.png" medium="image">
			<media:title type="html">enter image description here</media:title>
		</media:content>
	</item>
		<item>
		<title>RabbitMQ Queue Auto-Delete</title>
		<link>http://yabfog.com/blog/2013/04/23/rabbitmq-queue-auto-delete</link>
		<comments>http://yabfog.com/blog/2013/04/23/rabbitmq-queue-auto-delete#comments</comments>
		<pubDate>Tue, 23 Apr 2013 21:09:26 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[amqp]]></category>
		<category><![CDATA[queues]]></category>
		<category><![CDATA[rabbitmq]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778689</guid>
		<description><![CDATA[Breadcrumbs for myself. Queue config options: exclusive: delete when declaring connection closes. No other connection can even access this. Only queues can be exclusive. autodelete: delete when the last downstream thing (i.e. consumers for a queue, or queues for an &#8230; <a href="http://yabfog.com/blog/2013/04/23/rabbitmq-queue-auto-delete">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Breadcrumbs for myself.</p>
<h2>Queue config options:</h2>
<ul>
<li>
<p><code>exclusive</code>: delete when declaring <em>connection</em> closes. No other<br />
connection can even access this. Only queues can be exclusive.</p>
</li>
<li>
<p><code>autodelete</code>: delete when the <em>last</em> downstream thing (i.e. consumers for<br />
a queue, or queues for an exchange) goes away. Note that this isn't<br />
bound to channels or connections at all really.</p>
</li>
<li>
<p><a href="http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2011-October/015380.html">exclusive is more frequently useful than autodelete</a></p>
</li>
</ul>
<h2>More about auto-delete:</h2>
<ul>
<li>
<p>auto_delete queues will delete themselves when their consumer count drops to 0 from a higher number. Otherwise<br />
they would delete themselves as soon as they were declared...</p>
</li>
<li>
<p>The downside of exclusive queues is that they can only have consumers on the connection that created them. So this doesn't work for shared queues, or queues created by some app that are subsequently to be consumed from by some other app.</p>
</li>
<li>
<p><a href="http://rabbitmq.1065348.n5.nabble.com/Auto-Delete-queues-not-getting-deleted-td22461.html">Auto-Delete queues not getting deleted</a></p>
</li>
</ul>
<h2>Other options:</h2>
<ul>
<li><a href="http://www.rabbitmq.com/ttl.html#queue-ttl">Queue TTL</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2013/04/23/rabbitmq-queue-auto-delete/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Fragile Tools</title>
		<link>http://yabfog.com/blog/2012/10/13/fragile-tools</link>
		<comments>http://yabfog.com/blog/2012/10/13/fragile-tools#comments</comments>
		<pubDate>Sun, 14 Oct 2012 02:05:46 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[miscellany]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778678</guid>
		<description><![CDATA[Not as much fun as Fraggle Rock. I'm currently dependent on the following fragile tools: Twitter Google Reader To a lesser extent, Firefox and Chrome What do I mean by "fragile tools"? Consider Twitter: It started as a fun ecosystem &#8230; <a href="http://yabfog.com/blog/2012/10/13/fragile-tools">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Not as much fun as <a href="http://www.youtube.com/watch?v=BMu7WvM_zik">Fraggle Rock</a>.</p>
<p>I'm currently dependent on the following fragile tools:</p>
<ol>
<li>Twitter</li>
<li>Google Reader</li>
<li>To a lesser extent, Firefox and Chrome</li>
</ol>
<p>What do I mean by "fragile tools"? Consider Twitter: It started as a fun ecosystem for development, where anyone could whip up an interesting alternative way to interact with the service. Now? Not so much. Remember "track"? Yeah.</p>
<p>And Google Reader seems to have only one developer -- just babysitting it. The API is not documented and can change at any moment, without notice. Plus, Google has been sunsetting services left and right. Having killed off virtually all competitors, when will Google shut down Reader?</p>
<p>Firefox and Chrome are both moving to narrow their feature sets. Both seem incredulous that I might want to enter the URL of an XML file and view that file in my browser window. On the plus side, both are light-years ahead of Internet Explorer or Safari in usability and reliability.</p>
<p>Any of these tools could very quickly stop offering key features or go away entirely. The precariousness of my position as a user of those tools leaves me in a constant state of anxiety.</p>
<p>P.S. This post primarily is intended to test a one of the plugins I'm using. So, it's really just a bunch of conclusory statements without any references or argument.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2012/10/13/fragile-tools/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
	</item>
		<item>
		<title>Making FiOS Actiontec Router and Apple Bonjour Services Play Together</title>
		<link>http://yabfog.com/blog/2012/09/14/making-fios-actiontec-router-and-apple-bonjour-services-play-together</link>
		<comments>http://yabfog.com/blog/2012/09/14/making-fios-actiontec-router-and-apple-bonjour-services-play-together#comments</comments>
		<pubDate>Sat, 15 Sep 2012 02:26:59 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[actiontec]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bonjour]]></category>
		<category><![CDATA[fios]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[mDNS]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[routers]]></category>
		<category><![CDATA[verizon]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778674</guid>
		<description><![CDATA[I have Verizon FiOS at home. It's very fast, but if you want optimal speed and all the features the service offers, you must use the router supplied by Verizon. This week, Verizon replaced my old router with a new &#8230; <a href="http://yabfog.com/blog/2012/09/14/making-fios-actiontec-router-and-apple-bonjour-services-play-together">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I have Verizon FiOS at home. It's very fast, but if you want optimal speed and all the features the service offers, you must use the router supplied by Verizon. This week, Verizon replaced my old router with a new one: <a href="http://www.actiontec.com/products/product.php?pid=189">Actiontec MI424WR</a>-GEN3I. Unlike the older model it replaced, the new router is a Gigabit LAN router and a 802.11n wireless router. That's great! But with the new speed also came a new problem: Bonjour services were't working properly on my home network. Specifically, my MacBook (using WiFi) could not find other computers and printers on the network.</p>
<p>Apparently, this is a <a href="http://www.google.com/search?q=bonjour%20router%20actiontec">common problem</a>.</p>
<p>First, I tried this supposed solution: <a href="http://defenestrated.typepad.com/defenestrated/2010/12/howto-fix-bonjour-failures-when-using-an-actiontec-verizon-fios-router.html">disable 802.11b mode</a>. No luck.</p>
<p>Then, I saw this suggestion: <a href="http://cooper7.wordpress.com/2012/03/02/multicast-bonjour-on-actiontec-wireless/">create an ACL whitelist entry</a> for 224.0.0.251/255.255.255.255 in the IGMP proxy settings on the Actiontec router. That sounded ridiculous, so I kept looking.</p>
<p>Finally, I came across this: <a href="http://forums.verizon.com/t5/FiOS-Internet/Communication-between-wired-and-wireless-network-on-actiontec/m-p/464309#M30820">disable the IGMP proxy on the Actiontec router</a>. I am loathe to disable a default setting that I don't understand, but this fixed my problem instantly, and I have yet to see any negative consequences.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2012/09/14/making-fios-actiontec-router-and-apple-bonjour-services-play-together/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
	</item>
		<item>
		<title>Enermax KB007U-B Key Picture</title>
		<link>http://yabfog.com/blog/2012/09/06/enermax-kb007u-b-key-picture</link>
		<comments>http://yabfog.com/blog/2012/09/06/enermax-kb007u-b-key-picture#comments</comments>
		<pubDate>Fri, 07 Sep 2012 02:48:03 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[hardward]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[repair]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778660</guid>
		<description><![CDATA[My sons keep popping the keys off of my Enermax KB007U-B keyboard, and I was having a hard time putting them back on. But this picture proved very helpful because it shows how the little, white scissor hinges (or whatever &#8230; <a href="http://yabfog.com/blog/2012/09/06/enermax-kb007u-b-key-picture">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img alt="Enermax KB007U-B Key" src="http://i.ebayimg.com/t/Enermax-Aurora-KB007U-B-INDIVIDUAL-Keyboard-keys-/00/s/NDAxWDYwMA==/$(KGrHqFHJEoE+WM2Vr9)BQOhyFeIWw~~60_12.JPG" title="Enermax KB007U-B Key" class="alignnone" width="500" height="334" /></p>
<p>My sons keep popping the keys off of my Enermax KB007U-B keyboard, and I was having a hard time putting them back on. But this picture proved very helpful because it shows how the little, white scissor hinges (or whatever the hell they are) are supposed to be connected.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2012/09/06/enermax-kb007u-b-key-picture/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://i.ebayimg.com/t/Enermax-Aurora-KB007U-B-INDIVIDUAL-Keyboard-keys-/00/s/NDAxWDYwMA==/$(KGrHqFHJEoE+WM2Vr9)BQOhyFeIWw~~60_12.JPG" />
		<media:content url="http://i.ebayimg.com/t/Enermax-Aurora-KB007U-B-INDIVIDUAL-Keyboard-keys-/00/s/NDAxWDYwMA==/$(KGrHqFHJEoE+WM2Vr9)BQOhyFeIWw~~60_12.JPG" medium="image">
			<media:title type="html">Enermax KB007U-B Key</media:title>
		</media:content>
	</item>
		<item>
		<title>Using watch with a bash alias</title>
		<link>http://yabfog.com/blog/2012/09/06/using-watch-with-a-bash-alias</link>
		<comments>http://yabfog.com/blog/2012/09/06/using-watch-with-a-bash-alias#comments</comments>
		<pubDate>Thu, 06 Sep 2012 18:08:22 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778657</guid>
		<description><![CDATA[I love the Unix watch command. On OSX, you can install it easily with Homebrew: brew install watch Something I didn't realize until 10 minutes ago is that if you want to watch the output of something in your bash &#8230; <a href="http://yabfog.com/blog/2012/09/06/using-watch-with-a-bash-alias">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I love the Unix <code>watch</code> command. On OSX, you can install it easily with Homebrew:</p>
<pre>brew install watch</pre>
<p>Something I didn't realize until 10 minutes ago is that if you want to watch the output of something in your bash aliases, watch will complain because it cannot find the command. This is because watch evaluates the command you pass to it with 'sh -c', which does not expand aliases. However, if you also create an alias for watch itself, aliases will work. So, you can add the following to your .bashrc:</p>
<pre>
alias watch='watch '
</pre>
<p>Note the trailing space inside the quotation marks.</p>
<p>Link:</p>
<ul>
<li><a href="http://www.linuxquestions.org/questions/linux-general-1/using-watch-on-an-alias-in-bashrc-272480/">using 'watch' on an alias in .bashrc</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2012/09/06/using-watch-with-a-bash-alias/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Fixing Node.js v0.8.2 Build on Linux</title>
		<link>http://yabfog.com/blog/2012/07/11/fixing-node-js-v0-8-2-build-on-linux</link>
		<comments>http://yabfog.com/blog/2012/07/11/fixing-node-js-v0-8-2-build-on-linux#comments</comments>
		<pubDate>Wed, 11 Jul 2012 20:35:16 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[rhel]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778649</guid>
		<description><![CDATA[There's a nasty gcc bug on RedHat (RHEL 6) and CentOS Linux (and related) that gets triggered when you try to build Node.js v0.8.2: pure virtual method called. Solution: Run make install CFLAGS+=-O2 CXXFLAGS+=-O2 instead of just make install. More &#8230; <a href="http://yabfog.com/blog/2012/07/11/fixing-node-js-v0-8-2-build-on-linux">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>There's a nasty gcc bug on RedHat (RHEL 6) and CentOS Linux (and related) that gets triggered when you try to build Node.js v0.8.2: <code>pure virtual method called</code>.</p>
<p>Solution: Run <code>make install CFLAGS+=-O2 CXXFLAGS+=-O2</code> instead of just <code>make install</code>.</p>
<p>More info:</p>
<ul>
<li><a href="https://github.com/joyent/node/issues/3675">Cannot compile node.js 0.8.2 under CentOS 6.2</a></li>
<li><a href="https://github.com/joyent/node/issues/3673">"make install": terminate called without an active exception</a></li>
<li><a href="https://github.com/joyent/node/commit/b40f813">build: fix spurious mksnapshot crashes for good</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2012/07/11/fixing-node-js-v0-8-2-build-on-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>Mongoose Indexes and RAM Usage</title>
		<link>http://yabfog.com/blog/2012/05/27/mongoose-indexes-and-ram-usage</link>
		<comments>http://yabfog.com/blog/2012/05/27/mongoose-indexes-and-ram-usage#comments</comments>
		<pubDate>Sun, 27 May 2012 06:27:27 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[mongo]]></category>
		<category><![CDATA[mongoose]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[ram]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778644</guid>
		<description><![CDATA[If you're using Mongoose, you've changed your indexes, and you're wondering why you've run out of RAM, go into the Mongo shell and manually drop any indexes you are no longer using. Mongoose has no method for deleting indexes you're &#8230; <a href="http://yabfog.com/blog/2012/05/27/mongoose-indexes-and-ram-usage">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>If you're using Mongoose, you've changed your indexes, and you're wondering why you've run out of RAM, go into the Mongo shell and manually drop any indexes you are no longer using. Mongoose has no method for deleting indexes you're not using any more, so they accumulate, gobbling up RAM.</p>
<p>Now that you've cleaned out those unused indexes, restart Mongo. After the cache warms up (and depending on how many indexes you deleted), you could see a dramatic decrease in RAM consumption.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2012/05/27/mongoose-indexes-and-ram-usage/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>How do I add an empty directory to a git repository?</title>
		<link>http://yabfog.com/blog/2012/04/17/how-do-i-add-an-empty-directory-to-a-git-repository</link>
		<comments>http://yabfog.com/blog/2012/04/17/how-do-i-add-an-empty-directory-to-a-git-repository#comments</comments>
		<pubDate>Tue, 17 Apr 2012 18:45:07 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778640</guid>
		<description><![CDATA[Via Stack Overflow. And, of course, git add the empty directory. So helpful.]]></description>
				<content:encoded><![CDATA[<p><script type="text/javascript" src="https://gist.github.com/2408113.js?file=gistfile1"></script><br />
<a href="http://stackoverflow.com/a/932982/749272">Via Stack Overflow</a>.</p>
<p>And, of course, <code>git add</code> the empty directory.</p>
<p>So helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2012/04/17/how-do-i-add-an-empty-directory-to-a-git-repository/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>A Gotcha Using Node.js + Request In a Daemon</title>
		<link>http://yabfog.com/blog/2012/04/13/a-gotcha-using-node-js-request-in-a-daemon</link>
		<comments>http://yabfog.com/blog/2012/04/13/a-gotcha-using-node-js-request-in-a-daemon#comments</comments>
		<pubDate>Fri, 13 Apr 2012 16:14:37 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[request]]></category>

		<guid isPermaLink="false">http://yabfog.com/blog/?p=91778635</guid>
		<description><![CDATA[I have a Node.js program running as a daemon on a Linux VPS. Periodically, it polls a list of URLs using request. When it first starts, everything runs smoothly. But after running for a while, it starts getting 400 errors, &#8230; <a href="http://yabfog.com/blog/2012/04/13/a-gotcha-using-node-js-request-in-a-daemon">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I have a <a href="http://nodejs.org">Node.js</a> program running as a daemon on a Linux VPS. Periodically, it polls a list of URLs using <code><a href="https://github.com/mikeal/request">request</a></code>. When it first starts, everything runs smoothly. But after running for a while, it starts getting <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1">400</a> errors, and the longer it runs, the more URLs return 400 errors.</p>
<p>I could not understand what was going on. My code was basically structured like this:</p>
<p><script src="https://gist.github.com/2377840.js?file=request-excerpt.js" type="text/javascript"></script></p>
<p>Given that code, we know the <code>req</code> object is initialized with each function call. So, how could this script degrade over time?</p>
<p>Well, I finally tracked it down: COOKIES!</p>
<p>Yup, <code>request</code> has cookies enabled by default. So, I think what was happening was that cookies were being set (presumably, top domain-level cookies having the same name at different URLs or subdomains on the same domain) but the values in request's cookie jar were not being returned properly. That means the remote host was getting invalid cookies -- hence the 400 response for a "Bad Request."</p>
<p>I haven't yet spent the time to figure out if this is a bug in <code>request</code>. It's on my TODO list.</p>
<p>In the meantime, I've disabled cookies in the <code>req</code> object:<br />
<code>var req = { url: url, timeout: options.timeout, jar: false };</code></p>
<p>It's now working as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2012/04/13/a-gotcha-using-node-js-request-in-a-daemon/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
	</item>
	</channel>
</rss>
