Permalink
Browse files

Added more test info

  • Loading branch information...
1 parent c8ce547 commit 71c9d558a8ad81e38b43758f3f001159c164b5c3 @richarvey committed May 23, 2012
Showing with 22 additions and 1 deletion.
  1. +22 −1 README.md
View
23 README.md
@@ -45,11 +45,32 @@ You can use curl to send a test string and view the HTTP header you recieve back
Connection: Keep-Alive
Date: Tue, 10 Apr 2012 13:36:27 GMT
+If you rewuest a host that already has __www.__ prepended the response will look like the following:
+
+ curl -I -H "HOST: www.squarecows.com" http://194.246.109.141
+
+ HTTP/1.1 301 Moved Permanently
+ X-Powered-By: Express
+ Content-Type: text/html
+ Location: http://squarecows.com/
+ Connection: keep-alive
+
+Note: Don't do something silly and put yourself in a loop!
+
+If you request an invalid Host such as an IP address the response will look like this:
+
+ curl -I -H "HOST: 194.65.86.90" http://194.246.109.141
+
+ HTTP/1.1 400 Bad Request
+ X-Powered-By: Express
+ Content-Type: text/plain; charset=utf-8
+ Content-Length: 39
+ Connection: keep-alive
+
#### Testing the hosted service
curl -I -H "HOST: squarecows.com" http://194.246.109.141
#### Testing your local service
curl -I -H "HOST: squarecows.com" http://127.0.0.1:3000
-

0 comments on commit 71c9d55

Please sign in to comment.