【发布时间】:2017-12-15 18:15:07
【问题描述】:
我有一个包含表单提交的 html 页面:
<form name="pc_request_form" action="https://coupon-liquibil.rhcloud.com/RequestPointCard" method="POST">
其中https://coupon-liquibil.rhcloud.com 是托管应用程序的 Openshift 提供的 url。这很好用。
现在,我想使用自己的“webcoupon.us”作为应用程序的域,所以我在域注册商(Google)处设置了域转发:
http://webcoupon.us **to** https://coupon-liquibil.rhcloud.com
同时,我将我的html文件中的表单头改为:
<form name="pc_request_form" action="http://webcoupon.us/RequestPointCard" method="POST">
我的问题:在此之后,每当我提交表单时,我都会收到一条 http 错误消息:
Request method 'GET' not supported
同时,我的应用日志中也出现了这样的错误信息:
09:29:25,034 WARN [org.springframework.web.servlet.PageNotFound] Request method 'GET' not supported
这个错误消息(在我的应用日志中)让我相信
- http 请求(表单提交)中的 http://webcoupon.us 已按预期正确解析为 https://coupon-liquibil.rhcloud.com。但是
- 在 http://webcoupon.us 被解析后,请求被服务器(我的应用程序)解释为 GET,而不是预期的 POST 请求——这是为什么?
该应用是在 Springframework REST API 中实现的。我还尝试过 Godaddy 进行域转发。结果是一样的。 [END]
【问题讨论】:
标签: html post http-post spring-rest