doudou8893 2016-08-14 23:28
浏览 140
已采纳

如果IIS服务器遇到断点,PHP Curl会重复请求

I have a ASP MVC site which is a very basic REST service protected by a HMAC authentication scheme. At the moment it is failing to authenticate using a PHP client library.

In order to try to debug this, I run the site from visual studio, use a linux VM to work on the php side of things and expose my IIS site to that VM.

As soon as I set a breakpoint in the ASP site on the authentication filter, I saw that breakpoint being hit multiple times for what I thought was a single php curl request. I fired up fiddler and it actually seems if I hit a breakpoint on the ASP side, the curl request seems to replay itself over and over, interestingly even the HMAC stuff seems to be recalculated which infers the php script is being executed multiple times. The rate seems overly excessive as well, approx 20 per second.

If I remove that breakpoint, only one curl request gets sent.

Having that many requests hit the server when you are trying to debug an async authentication method really does make life hard.

I saw the headers had a Connection: Keep-Alive on it so I tried removing that from the curl parameters, but that didn't help

Anyone got any ideas please?

  • 写回答

1条回答 默认 最新

  • duanping1632 2016-08-15 21:42
    关注

    Seems it was firefox doing the connection replays - I'm sure that really helps when a site is being DDoS'd, but anyway there we go.

    I got around it by using the PHP CLI to run the script in a terminal.

    Thanks

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码