README.asciidoc 835 B

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