angularjs - 特定浏览器中的 HTML 表单发布重定向错误
问题描述
我必须对第三方客户端执行带有某些参数的 html 表单 POST。
<FORM METHOD="POST" ACTION="https://www.thirparty.com.np/Retail/sgonHttpHandler.aspx?Action.ShoppingMall.Login.Init=Y">
<INPUT TYPE=hidden NAME="BankId" VALUE="004">
<INPUT TYPE=hidden NAME="MD" VALUE="P">
<INPUT TYPE=hidden NAME="PID" VALUE="000000003154">
<INPUT TYPE=hidden NAME="CRN" VALUE="NPR">
<INPUT TYPE=hidden NAME="RU" VALUE="http://shop/response_post.aspx?">
<INPUT TYPE=hidden NAME="CG" VALUE="N">
<INPUT TYPE=hidden NAME="USER_LANG_ID" VALUE="001">
<INPUT TYPE=hidden NAME="UserType" VALUE="1">
<INPUT TYPE=hidden NAME="AppType" VALUE="retail">
<INPUT TYPE=SUBMIT VALUE="PAY">
</FORM>
当将其用作独立的 html 文件时,此表单可以正常工作。但是当我们把它放在我们的应用程序中时,它在 angularJs 中。表格似乎不起作用。
独立使用时,我从服务器收到以下响应
Request URL: https://www.thirparty.com.np/Retail/sgonHttpHandler.aspx?Action.ShoppingMall.Login.Init=Y
Request Method: POST
Status Code: 200 OK
Request URL: https://www.thirparty.com.np/Retail/(S(nkqmntjneehv3kfv0yogfk55))/sgonHttpHandler.aspx?Action.ShoppingMall.Login.Init=Y
Request Method: POST
Status Code: 302 Found
Request URL: https://www.thirparty.com.np/Retail/(S(nkqmntjneehv3kfv0yogfk55))/web/L001/retail/jsp/ebpp/RetShoppingMallSignOn.aspx?RequestId=41373058
Request Method: GET
Status Code: 200 OK
第三个 url 是它应该去的地方,即登录页面。
但是当从应用程序中完成时,我们得到
Request URL: https://www.thirparty.com.np/Retail/sgonHttpHandler.aspx?Action.ShoppingMall.Login.Init=Y
Request Method: POST
Status Code: 302 Found
Request URL: https://www.thirparty.com.np/Retail/(S(b3w11s45wtji1vbdx3grrc45))/sgonHttpHandler.aspx?Action.ShoppingMall.Login.Init=Y
Request Method: GET
Status Code: 302 Found
Request URL: https://www.thirparty.com.np/Retail/(S(b3w11s45wtji1vbdx3grrc45))/web/errsetup.aspx?RequestId=50835532
Request Method: GET
Status Code: 200 OK
POST 表单的第一个响应是
302 找到
而当使用 html 表单作为独立时,它会返回
200 好
为什么会这样?第三方网站没有为安全做任何事情。所以这似乎不是由于IP没有被列入白名单造成的。
编辑
发现的一件事是,当使用独立的 html 文件时,表单是作为文档类型提交的。但是当从应用程序内部使用时,发送的表单是text。
解决方案
推荐阅读
- spring-boot - 如何使用单独的 DLT 处理程序配置 2 RetryTopicConfiguration
- sql - LAST_VALUE 和 FIRST_VALUE
- android - Android Studio 任务:app:kaptGenerateStubsDevDebugKotlin
- c# - 动态调整列大小以适应 WPF 中的 DataGrid
- mongodb - 如何在聚合中使用 MongoDB $in
- php - 我的“WooCommerce 产品自定义排序功能”使 Wordpress Dashbord 中的帖子/页面崩溃
- javascript - ant d 从数组中选择,反应,js
- r - 我似乎无法生成图表
- c++ - opengl中的纹理映射不正确
- php - Symfony - swagger ui 无法从路径加载