<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Snooda]]></title> 
<link>http://www.snooda.com/index</link> 
<description><![CDATA[Snooda's Blog]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Snooda]]></copyright>
<item>
<link>http://www.snooda.com/read/</link>
<title><![CDATA[cgi编程注意事项-http头不可缺少]]></title> 
<author>snooda &lt;admin@snooda.com&gt;</author>
<category><![CDATA[默认分类]]></category>
<pubDate>Thu, 09 Jun 2011 18:25:35 +0000</pubDate> 
<guid>http://www.snooda.com/read/</guid> 
<description>
<![CDATA[ 
	    最近想搞个fastcgi模块跟nginx交互，弄了个测试程序结果怎么也跑不起来，直接显示502，nginx日志显示“upstream closed prematurely FastCGI stdout while reading response header from upstream”。调了很长时间调不出来，gdb显示程序运行没什么问题。后来请教高人，终于发现了问题，原来cgi回复里面http头一定要自己构造的，其中的“Content-type: text/html”必不可少，且由“<br />
”结尾，也可自己根据需要添加cookie等头信息，然后需要有一个“<br />
”组成的空行（http头规定），然后是http内容，http内容就可以自己随便写了。
]]>
</description>
</item><item>
<link>http://www.snooda.com/read/#blogcomment</link>
<title><![CDATA[[评论] cgi编程注意事项-http头不可缺少]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.snooda.com/read/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>