README.asciidoc 882 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. = Error hook example
  2. *This example is currently broken on master.*
  3. To try this example, you need GNU `make` and `git` in your PATH.
  4. To build and run the example, use the following command:
  5. [source,bash]
  6. $ make run
  7. Then point your browser to http://localhost:8080
  8. == Example output
  9. Not found:
  10. [source,bash]
  11. ----
  12. $ curl -i http://localhost:8080
  13. HTTP/1.1 404 Not Found
  14. connection: keep-alive
  15. server: Cowboy
  16. date: Wed, 27 Feb 2013 23:32:55 GMT
  17. content-length: 56
  18. 404 Not Found: "/" is not the path you are looking for.
  19. ----
  20. Bad request:
  21. [source,bash]
  22. ----
  23. $ telnet localhost 8080
  24. Trying ::1...
  25. Connection failed: Connection refused
  26. Trying 127.0.0.1...
  27. Connected to localhost.
  28. Escape character is '^]'.
  29. bad
  30. HTTP/1.1 400 Bad Request
  31. connection: close
  32. server: Cowboy
  33. date: Sun, 08 Sep 2013 09:29:27 GMT
  34. content-length: 15
  35. HTTP Error 400
  36. Connection closed by foreign host.
  37. ----