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

我有一个ASP MVC站点,它是一个受HMAC身份验证方案保护的非常基本的REST服务。 目前它无法使用PHP客户端库进行身份验证。</ p>

为了尝试调试这个,我从visual studio运行该站点,使用linux VM来处理php 事情的一面,并将我的IIS站点暴露给该VM。 </ p>

一旦我在身份验证过滤器的ASP站点中设置断点,我就会看到断点被多次命中,因为我认为这是一个单独的php curl请求。 我启动了小提琴手,看起来如果我在ASP端遇到一个断点,那么curl请求似乎一遍又一遍地重放,有趣的是甚至HMAC的东西似乎都被重新计算,这推断出php脚本正在多次执行。 速率似乎过度过度,大约每秒20次。</ p>

如果我删除该断点,则只发送一个卷曲请求。</ p>

拥有 当您尝试调试异步身份验证方法时,很多请求都会命中服务器确实会让生活变得艰难。</ p>

我看到标题有一个Connection:Keep-Alive就这样我尝试删除它 从卷曲参数,但没有帮助</ p>

任何人有任何想法吗?</ p>
</ div>

展开原文

原文

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?

dongliushui2001
dongliushui2001 不知道,哪个是这个的发起者?Curl,PHP还是Apache?
大约 4 年之前 回复
duanhuan3705
duanhuan3705 这是否正在生成重试,因为它在x毫秒内没有得到响应?
大约 4 年之前 回复

1个回答



似乎是firefox正在进行连接重放 - 我确信当网站被DDoS时真的有帮助,但无论如何 我们去了。</ p>

我通过使用PHP CLI在终端中运行脚本来解决它。</ p>

谢谢</ p>
< / DIV>

展开原文

原文

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

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐