Created
November 6, 2013 15:20
-
-
Save iperdomo/7337782 to your computer and use it in GitHub Desktop.
Compojure issue
This file contains hidden or 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
| $ lein -version | |
| # Leiningen 2.3.3 on Java 1.6.0_27 OpenJDK 64-Bit Server VM | |
| $ lein new compojure test | |
| $ cd test | |
| $ lein deps | |
| $ echo "User-agent: * | |
| > Disallow: / | |
| > " > resources/public/robots.txt | |
| $ lein ring server | |
| $ curl http://localhost:3000 | |
| Hello World | |
| $ curl -I http://localhost:3000 | |
| HTTP/1.1 200 OK | |
| Date: Wed, 06 Nov 2013 15:13:57 GMT | |
| Content-Type: text/html;charset=UTF-8 | |
| Content-Length: 0 | |
| Server: Jetty(7.6.8.v20121106) | |
| $ curl http://localhost:3000/robots.txt | |
| User-agent: * | |
| Disallow: / | |
| $ curl -I http://localhost:3000/robots.txt | |
| HTTP/1.1 200 OK | |
| Date: Wed, 06 Nov 2013 15:16:00 GMT | |
| Last-Modified: Wed, 06 Nov 2013 15:12:03 +0000 | |
| Content-Length: 27 | |
| Content-Type: text/plain | |
| Server: Jetty(7.6.8.v20121106) | |
| $ curl http://localhost:3000/not-existent.txt | |
| Not Found # <--- correct | |
| $ curl -I http://localhost:3000/not-existent.txt | |
| HTTP/1.1 200 OK # <--- incorrect??? It should be 404 | |
| Date: Wed, 06 Nov 2013 15:18:04 GMT | |
| Content-Length: 0 | |
| Server: Jetty(7.6.8.v20121106) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -Imakes aHEADrequest, not aGETrequest.