remy/mit-license — pull request #211 by treyhunner (2012-11-16 22:31:46+00:00)
Title: Send txt version if user agent is curl

This change adds user agent sniffing behavior similar to other tools (such as http://ifconfig.me).

This makes:

curl http://rem.mit-license.org

Equivalent to

curl http://rem.mit-license.org/license.txt

I made this change because primarily it allows easier creation of LICENSE.txt files:

curl http://rem.mit-license.org > LICENSE.txt

It seems like the default version when using curl should always be the txt version since scraping the HTML version from a command line tool isn't useful.