Server crashes with "[Errno 104] Connection reset by peer"
Bug #959860 reported by
Corbin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HTTPy |
Fix Released
|
Medium
|
Corbin |
Bug Description
httpy 0.1.6
Server crashes after scanning the system's open ports with Nmap.
Console output:
Traceback (most recent call last):
File "./httpy", line 165, in <module>
main()
File "./httpy", line 139, in main
header = client.recv(1024) # truncate after 1024 bytes
socket.error: [Errno 104] Connection reset by peer
It looks like Nmap is connecting to the port to see if it is open, then httpy waits for it to send an HTTP header, but Nmap closes the port and scans the next one. Httpy doesn't know what to do if it doesn't receive a header from the client before the connection closes, so it just crashes. Seems like a simple try/except should be able to fix this.
Changed in httpy: | |
status: | New → Confirmed |
Changed in httpy: | |
status: | Confirmed → Fix Committed |
Changed in httpy: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.