Created
April 24, 2015 18:30
-
-
Save kpdyer/ffeac817741846a9ffc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connection(tcp, 8080): | |
start client http_get 1.0 | |
client server http_ok 1.0 | |
server end NULL 1.0 | |
action http_get: | |
server io.gets("GET / HTTP/1.0\r\n\r\n") | |
action http_ok: | |
server io.puts("HTTP/1.1 301 Moved Permanently\r\nContent-Type: text/html; charset=iso-8859-1\r\nLocation: myserver\r\nServer: Apache/2.4.7 (Ubuntu)\r\nContent-Length: 335\r\nConnection: Close\r\n\r\n<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\r\n<html><head>\r\n<title>301 Moved Permanently</title>\r\n</head><body>\r\n<h1>Moved Permanently</h1>\r\n<p>The document has moved <a href="https://kpdyer.com/">here</a>.</p>\r\n<hr>\r\n<address>Apache/2.4.7 (Ubuntu) Server at ip-10-252-25-132.us-west-2.compute.internal Port 80</address>\r\n</body></html>\r\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment