添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=p2mt4l553bti4x55geyiwiil; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 14663

but on my live server, I just get:

curl: (56) Recv failure: Connection reset by peer

They are both using the same curl version (7.21.0) and for now, I am only getting this error for only one specific url.

How should I fix this?

copied from CURL ERROR: Recv failure: Connection reset by peer - PHP Curl

I think the section D,E might help:

D. Maximum Transmission Unit

One common cause of this error is that the MTU (Maximum Transmission Unit) size of packets travelling over your network connection have been changed from the default of 1500 bytes. If you have configured VPN this most likely must changed during configuration

D. Firewall : iptables

If you don't know your way around this guys they would cause some serious issues .. try and access the server you are connecting to check the following

You have access to port 80 on that server Example

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT` The Following is at the last line not before any other ACCEPT Example

-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited Check for ALL DROP , REJECT and make sure they are not blocking your connection

Temporary allow all connection as see if it foes through

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .