获取 DYNDNS 传递的 URL 处的 POST 参数
背景:
Foobar.htm 表单使用:
<form action="http://rawurl-here.gotdns.org" method="POST">
[...]
</form>
rawurl-here.gotdns.org 是一个动态 DNS url,它将用户重定向到:
http://currentsite001.mysite.org
问题:
有没有办法确保Foobar.htm 发送的 POST 参数总是到达最终目标,无论来自 rawurl-here.gotdns.org 的路径如何?
Background:
Foobar.htm form uses this:
<form action="http://rawurl-here.gotdns.org" method="POST">
[...]
</form>
rawurl-here.gotdns.org is a Dynamic DNS url that redirects the user to:
http://currentsite001.mysite.org
Question:
Is there a way to ensure that the POST parameters sent by Foobar.htm always reach the final target, regardless of the passthru from rawurl-here.gotdns.org?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不可以,POST 请求无法重定向。 HTTP 规范 规定,任何重定向的尝试非 GET/HEAD 请求必须由用户确认。然而,正如 302 重定向文本中所述,大多数浏览器都会忽略这一点,只是将 POST 更改为 GET,此时您的参数就会消失。
您需要一个不重定向的动态 DNS 服务,而只是将 DNS A 记录直接指向您的 IP 地址。将您的盒子设置为响应
rawurl-here.gotdns.org
的请求,现在您不需要重定向。无论如何,DNS 重定向和框架服务很糟糕。
No, POST requests cannot be redirected. The HTTP spec says that any attempt to redirect a non-GET/HEAD request must be confirmed by the user. However, as noted in the text for the 302 redirect, most browsers ignore this and simply change the POST to a GET instead at which point your parameters are gone.
You need a dynamic DNS service that doesn't redirect, but just points the DNS A record directly to your IP address. Set your box up to respond to requests for
rawurl-here.gotdns.org
and now you don't need a redirect.DNS redirect and framing services suck anyhow.
我通常使用 DynDNS,POST 数据没有问题。
你有问题吗?或者只是想确保数据是否发送给您的目标?
[]的,
以及过去
I normally use DynDNS and haven't problems with POST data.
Do you have problems? Or just want ensure if the data are sent for your target?
[]'s,
And Past