http 帖子标头
当我在请求中发布一些标头并在接收页面上查看它们时,除了 [CONTENT_TYPE] => 等少数标头之外,大多数标头都以“HTTP_”为前缀。 文本/xml [CONTENT_LENGTH] => 8647.
当我发布自己的标头(外部服务器需要)时,它们会获得前缀,例如我的标头:BATCH_TYPE 显示为 HTTP_BATCH_TYPE
我的标头有一些问题,即我必须包含“BATCH_COUNT”之类的标头& 外部服务器的“VENDOR_ID”,当我在内部测试它们时,我将它们视为 HTTP_BATCH_COUNT 和 HTTP_VENDOR_ID
“HTTP_”前缀是否正常或者有什么方法可以删除它?
谢谢,
When I post some headers in a request and view them on on the receiving page, most of them are prefixed with "HTTP_" except for a few like [CONTENT_TYPE] => text/xml [CONTENT_LENGTH] => 8647.
When I post my own headers (which are required for an external server) they then get prefixed e.g. My header: BATCH_TYPE shows up as HTTP_BATCH_TYPE
I'm having some some problems with the headers i.e. I have to include ones like "BATCH_COUNT" & "VENDOR_ID" for an external server and when I test them internally I view them as HTTP_BATCH_COUNT and HTTP_VENDOR_ID
Is the "HTTP_" prefix normal or is there any way to remove it?
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 CGI 脚本进行测试,则由 Web 服务器添加 HTTP_ 前缀。 不用担心 - 该前缀几乎肯定不会出现在网络上。 您可以使用 http://www.xhaus.com/headers 进行检查。
If you're using a CGI script to test, then it's the web server that's adding the HTTP_ prefix. Don't worry - that prefix is almost certainly not present on the network. You could use http://www.xhaus.com/headers to check.