[英]perl: return no content back to browser
I'm passing a url (from javascript) to a perl script. 我正在将URL(从javascript)传递到perl脚本。 The perl script gets data back from the URL, processes it and writes a file.
perl脚本从URL取回数据,对其进行处理并写入文件。 That's all working fine.
一切都很好。
At this point all I want to return processing to the browser/javascript but I'm struggling to prevent the perl script from returning content to the browser. 在这一点上,我只想将处理返回到浏览器/ javascript,但是我在努力防止perl脚本将内容返回到浏览器。 It just blanks the page.
它只是空白页面。
I suspect it's the content type/header that's causing the issue but can't seem to find a way to inhibit it returning something the browser wants to display. 我怀疑是导致问题的原因是内容类型/标题,但似乎找不到办法阻止它返回浏览器想要显示的内容。
So far after much hunting I came across 到目前为止,经过很多狩猎,我遇到了
print "Status: 204 No Content\n\n";
Looked promising but I suspect just having the print command is enough to push something back at the browser. 看起来很有希望,但我怀疑仅使用print命令就足以将某些内容推回浏览器。
Any pointers appreciated. 任何指针表示赞赏。 I can't be the only person that just wants perl to go off and do a job without returning content.
我不能是唯一想要perl不做任何事情而不返回内容的人。
必须对请求做出响应,“ 204 No Content” 将某些内容推回浏览器:没有内容可显示的信息(因此浏览器将继续显示先前的内容)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.