avatasia
V2EX  ›  问与答

关于PRG模式(Post/Redirect/Get)的探讨

  •  
  •   avatasia · Feb 16, 2012 · 4335 views
    This topic created in 5206 days ago, the information mentioned may be changed or developed.
    http://en.wikipedia.org/wiki/Post/Redirect/Get

    支付宝付款的最后一步302 post了3次,这个是怎么实现的? 貌似redirect 不支持post吧。
    5 replies    1970-01-01 08:00:00 +08:00
    donwa
        1
    donwa  
       Feb 16, 2012
    307
    avatasia
        2
    avatasia  
    OP
       Feb 16, 2012
    @donwa
    avatasia
        3
    avatasia  
    OP
       Feb 16, 2012
    @donwa 貌似307有争议,而且redirect 302这个,在IE的Develope Tools下两个URL都是post,在firefox下302的是post, 200的是get。 支付宝fillAction.Html 和后面的2个URL都是post 302,百思不得其解。在stackoverflow上看到有人模拟web容易发送post的,但这个是发生在服务器,浏览器肯定看不到。
    avatasia
        4
    avatasia  
    OP
       Feb 16, 2012
    这次测试 fillAction.html 正常302到errorRepeatSubmit.htm(get)。页面内容
    对不起,请不要重复提交请求。 请回到原始页面重新刷新
    avatasia
        5
    avatasia  
    OP
       Feb 16, 2012
    眼拙了,alipay也是1次post, 两次get,完全符合标准流程,我还以为出了什么神奇的东西。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1041 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 19:13 · PVG 03:13 · LAX 12:13 · JFK 15:13
    ♥ Do have faith in what you're doing.