status.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2010 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package xweb
  5. import "net/http"
  6. var statusText = map[int]string{
  7. http.StatusContinue: "Continue",
  8. http.StatusSwitchingProtocols: "Switching Protocols",
  9. http.StatusOK: "OK",
  10. http.StatusCreated: "Created",
  11. http.StatusAccepted: "Accepted",
  12. http.StatusNonAuthoritativeInfo: "Non-Authoritative Information",
  13. http.StatusNoContent: "No Content",
  14. http.StatusResetContent: "Reset Content",
  15. http.StatusPartialContent: "Partial Content",
  16. http.StatusMultipleChoices: "Multiple Choices",
  17. http.StatusMovedPermanently: "Moved Permanently",
  18. http.StatusFound: "Found",
  19. http.StatusSeeOther: "See Other",
  20. http.StatusNotModified: "Not Modified",
  21. http.StatusUseProxy: "Use Proxy",
  22. http.StatusTemporaryRedirect: "Temporary Redirect",
  23. http.StatusBadRequest: "Bad Request",
  24. http.StatusUnauthorized: "Unauthorized",
  25. http.StatusPaymentRequired: "Payment Required",
  26. http.StatusForbidden: "Forbidden",
  27. http.StatusNotFound: "Not Found",
  28. http.StatusMethodNotAllowed: "Method Not Allowed",
  29. http.StatusNotAcceptable: "Not Acceptable",
  30. http.StatusProxyAuthRequired: "Proxy Authentication Required",
  31. http.StatusRequestTimeout: "Request Timeout",
  32. http.StatusConflict: "Conflict",
  33. http.StatusGone: "Gone",
  34. http.StatusLengthRequired: "Length Required",
  35. http.StatusPreconditionFailed: "Precondition Failed",
  36. http.StatusRequestEntityTooLarge: "Request Entity Too Large",
  37. http.StatusRequestURITooLong: "Request URI Too Long",
  38. http.StatusUnsupportedMediaType: "Unsupported Media Type",
  39. http.StatusRequestedRangeNotSatisfiable: "Requested Range Not Satisfiable",
  40. http.StatusExpectationFailed: "Expectation Failed",
  41. http.StatusInternalServerError: "Internal Server Error",
  42. http.StatusNotImplemented: "Not Implemented",
  43. http.StatusBadGateway: "Bad Gateway",
  44. http.StatusServiceUnavailable: "Service Unavailable",
  45. http.StatusGatewayTimeout: "Gateway Timeout",
  46. http.StatusHTTPVersionNotSupported: "HTTP Version Not Supported",
  47. }