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

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

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog