Skip to content

Instantly share code, notes, and snippets.

@jmcvetta
Created June 15, 2012 22:42
Show Gist options
  • Save jmcvetta/2939056 to your computer and use it in GitHub Desktop.
Save jmcvetta/2939056 to your computer and use it in GitHub Desktop.
HTTP 451 support in Golang
diff --git a/src/pkg/net/http/status.go b/src/pkg/net/http/status.go
--- a/src/pkg/net/http/status.go
+++ b/src/pkg/net/http/status.go
@@ -44,6 +44,7 @@
StatusRequestedRangeNotSatisfiable = 416
StatusExpectationFailed = 417
StatusTeapot = 418
+ StatusCensored = 451
StatusInternalServerError = 500
StatusNotImplemented = 501
@@ -92,6 +93,7 @@
StatusRequestedRangeNotSatisfiable: "Requested Range Not Satisfiable",
StatusExpectationFailed: "Expectation Failed",
StatusTeapot: "I'm a teapot",
+ StatusCensored: "Unavailable For Legal Reasons",
StatusInternalServerError: "Internal Server Error",
StatusNotImplemented: "Not Implemented",
@jmcvetta
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment