Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cosimo
Created August 25, 2011 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosimo/1171216 to your computer and use it in GitHub Desktop.
Save cosimo/1171216 to your computer and use it in GitHub Desktop.
Strace of a IO::Socket.recv() from local HTTP server
connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
sendto(3, "GET /ping.html HTTP/1.1\r\n\r\n", 27, 0, NULL, 0) = 27
# ite(1, "# Sent 'GET /ping.html HTTP/1.1\r"..., 67# Sent 'GET /ping.html HTTP/1.1
#
# '. Waiting a response...) = 67
write(1, "\n", 1
) = 1
mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc31ca1c000
recvfrom(3, "HTTP/1.1 400 Bad Request\r\nDate: "..., 2048, 0, NULL, NULL) = 515
recvfrom(3, "", 2048, 0, NULL, NULL) = 0
close(3) = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment