Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 7th, 2012  |  syntax: None  |  size: 0.32 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Get an error when use ruby to send hand coded http request
  2. socket = TCPSocket.open('localhost',4567)
  3.  
  4. request = "GET / HTTP/1.1rnHost:localhostrnrn"
  5.  
  6. socket.print request
  7.        
  8. [2012-08-01 14:04:11] ERROR bad Request-Line `'.
  9. ec2-184-169-164-27.us-west-1.compute.amazonaws.com - - [01/Aug/2012:14:04:11 UTC] "" 400 313
  10. - ->