Discuss / Python / 假如你出现了错误socket.error: [Errno 104] Connection reset by peer

假如你出现了错误socket.error: [Errno 104] Connection reset by peer

Topic source

NGUper

#1 Created at ... [Delete] [Delete and Lock User]

假如你出现了错误socket.error: [Errno 104] Connection reset by peer,请检查下send的字符串是否有问题,很有可能是少写了空格之类的。

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

发送的bytes分成几行是:

GET / HTTP/1.1\r\n
Host: www.sina.com.cn\r\n
Connection: close\r\n
\r\n

NGUper

#3 Created at ... [Delete] [Delete and Lock User]

Thanks.


  • 1

Reply