stretchrcom/goweb — pull request #2 by tenntenn (2013-02-20 05:18:58+00:00)
Title: add functions and tests for OPTIONS and HEAD methods of http

I added functions and tests for OPTIONS and HEAD methods of http.
Because some web browsers use OPTIONS method to checkAccess-Control-Allow-Origin and related headers (see: https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS).
For example, users want to separate a RESTful API server from a webserver which provides only static files (html, css, and js), users should be set Access-Control-Allow-Origin header to api response when access by OPTIONS method because the origin of the webserver is different from RESTful API's one.