README.asciidoc 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. = Compressed response 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. Without compression:
  10. [source,bash]
  11. ----
  12. $ curl -i http://localhost:8080
  13. HTTP/1.1 200 OK
  14. connection: keep-alive
  15. server: Cowboy
  16. date: Mon, 07 Jan 2013 18:42:29 GMT
  17. content-length: 909
  18. A cowboy is an animal herder who tends cattle on ranches in North America,
  19. traditionally on horseback, and often performs a multitude of other ranch-
  20. related tasks. The historic American cowboy of the late 19th century arose
  21. from the vaquero traditions of northern Mexico and became a figure of special
  22. significance and legend. A subtype, called a wrangler, specifically tends the
  23. horses used to work cattle. In addition to ranch work, some cowboys work for
  24. or participate in rodeos. Cowgirls, first defined as such in the late 19th
  25. century, had a less-well documented historical role, but in the modern world
  26. have established the ability to work at virtually identical tasks and obtained
  27. considerable respect for their achievements. There are also cattle handlers
  28. in many other parts of the world, particularly South America and Australia,
  29. who perform work similar to the cowboy in their respective nations.
  30. ----
  31. With compression:
  32. [source,bash]
  33. ----
  34. $ curl -i --compressed http://localhost:8080
  35. HTTP/1.1 200 OK
  36. connection: keep-alive
  37. server: Cowboy
  38. date: Mon, 07 Jan 2013 18:42:30 GMT
  39. content-encoding: gzip
  40. content-length: 510
  41. A cowboy is an animal herder who tends cattle on ranches in North America,
  42. traditionally on horseback, and often performs a multitude of other ranch-
  43. related tasks. The historic American cowboy of the late 19th century arose
  44. from the vaquero traditions of northern Mexico and became a figure of special
  45. significance and legend. A subtype, called a wrangler, specifically tends the
  46. horses used to work cattle. In addition to ranch work, some cowboys work for
  47. or participate in rodeos. Cowgirls, first defined as such in the late 19th
  48. century, had a less-well documented historical role, but in the modern world
  49. have established the ability to work at virtually identical tasks and obtained
  50. considerable respect for their achievements. There are also cattle handlers
  51. in many other parts of the world, particularly South America and Australia,
  52. who perform work similar to the cowboy in their respective nations.
  53. ----