http 帖子标头

发布于 2024-07-23 08:14:48 字数 366 浏览 2 评论 0原文

当我在请求中发布一些标头并在接收页面上查看它们时,除了 [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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

悲凉≈ 2024-07-30 08:14:49

如果您使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文