| |
最近想搞个fastcgi模块跟nginx交互,弄了个测试程序结果怎么也跑不起来,直接显示502,nginx日志显示“upstream closed prematurely FastCGI stdout while reading response header from upstream”。调了很长时间调不出来,gdb显示程序运行没什么问题。后来请教高人,终于发现了问题,原来cgi回复里面http头一定要自己构造的,其中的“Content-type: text/html”必不可少,且由“
”结尾,也可自己根据需要添加cookie等头信息,然后需要有一个“
”组成的空行(http头规定),然后是http内容,http内容就可以自己随便写了。
by snooda | 分类: 默认分类 | 评论(0) | 引用(0) | 阅读(2300)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]