mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 07:20:35 +01:00
statuses: sync with std package
This commit is contained in:
parent
17260d8d5d
commit
43c85d0c85
|
@ -102,7 +102,7 @@ func upload(ctx iris.Context) {
|
|||
|
||||
_, _, err := ctx.UploadFormFiles(uploadDir, beforeSave)
|
||||
if err != nil {
|
||||
ctx.StopWithError(iris.StatusPayloadTooRage, err)
|
||||
ctx.StopWithError(iris.StatusRequestEntityTooLarge, err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
126
aliases.go
126
aliases.go
|
@ -580,78 +580,78 @@ const (
|
|||
// See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.
|
||||
// Raw Copy from the future(tip) net/http std package in order to recude the import path of "net/http" for the users.
|
||||
const (
|
||||
StatusContinue = http.StatusContinue
|
||||
StatusSwitchingProtocols = http.StatusSwitchingProtocols
|
||||
StatusProcessing = http.StatusProcessing
|
||||
StatusEarlyHints = http.StatusEarlyHints
|
||||
StatusOK = http.StatusOK
|
||||
StatusCreated = http.StatusCreated
|
||||
StatusAccepted = http.StatusAccepted
|
||||
StatusNonAuthoritativeInfo = http.StatusNonAuthoritativeInfo
|
||||
StatusNoContent = http.StatusNoContent
|
||||
StatusResetContent = http.StatusResetContent
|
||||
StatusPartialContent = http.StatusPartialContent
|
||||
StatusMultiStatus = http.StatusMultiStatus
|
||||
StatusAlreadyReported = http.StatusAlreadyReported
|
||||
StatusIMUsed = http.StatusIMUsed
|
||||
StatusContinue = http.StatusContinue // RFC 7231, 6.2.1
|
||||
StatusSwitchingProtocols = http.StatusSwitchingProtocols // RFC 7231, 6.2.2
|
||||
StatusProcessing = http.StatusProcessing // RFC 2518, 10.1
|
||||
StatusEarlyHints = http.StatusEarlyHints // RFC 8297
|
||||
|
||||
StatusMultipleChoices = http.StatusMultipleChoices
|
||||
StatusMovedPermanently = http.StatusMovedPermanently
|
||||
StatusFound = http.StatusFound
|
||||
StatusSeeOther = http.StatusSeeOther
|
||||
StatusNotModified = http.StatusNotModified
|
||||
StatusUseProxy = http.StatusUseProxy
|
||||
StatusOK = http.StatusOK // RFC 7231, 6.3.1
|
||||
StatusCreated = http.StatusCreated // RFC 7231, 6.3.2
|
||||
StatusAccepted = http.StatusAccepted // RFC 7231, 6.3.3
|
||||
StatusNonAuthoritativeInfo = http.StatusNonAuthoritativeInfo // RFC 7231, 6.3.4
|
||||
StatusNoContent = http.StatusNoContent // RFC 7231, 6.3.5
|
||||
StatusResetContent = http.StatusResetContent // RFC 7231, 6.3.6
|
||||
StatusPartialContent = http.StatusPartialContent // RFC 7233, 4.1
|
||||
StatusMultiStatus = http.StatusMultiStatus // RFC 4918, 11.1
|
||||
StatusAlreadyReported = http.StatusAlreadyReported // RFC 5842, 7.1
|
||||
StatusIMUsed = http.StatusIMUsed // RFC 3229, 10.4.1
|
||||
|
||||
StatusTemporaryRedirect = http.StatusTemporaryRedirect
|
||||
StatusPermanentRedirect = http.StatusPermanentRedirect
|
||||
StatusMultipleChoices = http.StatusMultipleChoices // RFC 7231, 6.4.1
|
||||
StatusMovedPermanently = http.StatusMovedPermanently // RFC 7231, 6.4.2
|
||||
StatusFound = http.StatusFound // RFC 7231, 6.4.3
|
||||
StatusSeeOther = http.StatusSeeOther // RFC 7231, 6.4.4
|
||||
StatusNotModified = http.StatusNotModified // RFC 7232, 4.1
|
||||
StatusUseProxy = http.StatusUseProxy // RFC 7231, 6.4.5
|
||||
_ = 306 // RFC 7231, 6.4.6 (Unused)
|
||||
StatusTemporaryRedirect = http.StatusTemporaryRedirect // RFC 7231, 6.4.7
|
||||
StatusPermanentRedirect = http.StatusPermanentRedirect // RFC 7538, 3
|
||||
|
||||
StatusBadRequest = http.StatusBadRequest
|
||||
StatusUnauthorized = http.StatusUnauthorized
|
||||
StatusPaymentRequired = http.StatusPaymentRequired
|
||||
StatusForbidden = http.StatusForbidden
|
||||
StatusNotFound = http.StatusNotFound
|
||||
StatusMethodNotAllowed = http.StatusMethodNotAllowed
|
||||
StatusNotAcceptable = http.StatusNotAcceptable
|
||||
StatusProxyAuthRequired = http.StatusProxyAuthRequired
|
||||
StatusRequestTimeout = http.StatusRequestTimeout
|
||||
StatusConflict = http.StatusConflict
|
||||
StatusGone = http.StatusGone
|
||||
StatusLengthRequired = http.StatusLengthRequired
|
||||
StatusPreconditionFailed = http.StatusPreconditionFailed
|
||||
StatusRequestEntityTooLarge = http.StatusRequestEntityTooLarge
|
||||
StatusPayloadTooRage = StatusRequestEntityTooLarge
|
||||
StatusRequestURITooLong = http.StatusRequestURITooLong
|
||||
StatusUnsupportedMediaType = http.StatusUnsupportedMediaType
|
||||
StatusRequestedRangeNotSatisfiable = http.StatusRequestedRangeNotSatisfiable
|
||||
StatusExpectationFailed = http.StatusExpectationFailed
|
||||
StatusTeapot = http.StatusTeapot
|
||||
StatusMisdirectedRequest = http.StatusMisdirectedRequest
|
||||
StatusUnprocessableEntity = http.StatusUnprocessableEntity
|
||||
StatusLocked = http.StatusLocked
|
||||
StatusFailedDependency = http.StatusFailedDependency
|
||||
StatusTooEarly = http.StatusTooEarly
|
||||
StatusUpgradeRequired = http.StatusUpgradeRequired
|
||||
StatusPreconditionRequired = http.StatusPreconditionRequired
|
||||
StatusTooManyRequests = http.StatusTooManyRequests
|
||||
StatusRequestHeaderFieldsTooLarge = http.StatusRequestHeaderFieldsTooLarge
|
||||
StatusUnavailableForLegalReasons = http.StatusUnavailableForLegalReasons
|
||||
StatusBadRequest = http.StatusBadRequest // RFC 7231, 6.5.1
|
||||
StatusUnauthorized = http.StatusUnauthorized // RFC 7235, 3.1
|
||||
StatusPaymentRequired = http.StatusPaymentRequired // RFC 7231, 6.5.2
|
||||
StatusForbidden = http.StatusForbidden // RFC 7231, 6.5.3
|
||||
StatusNotFound = http.StatusNotFound // RFC 7231, 6.5.4
|
||||
StatusMethodNotAllowed = http.StatusMethodNotAllowed // RFC 7231, 6.5.5
|
||||
StatusNotAcceptable = http.StatusNotAcceptable // RFC 7231, 6.5.6
|
||||
StatusProxyAuthRequired = http.StatusProxyAuthRequired // RFC 7235, 3.2
|
||||
StatusRequestTimeout = http.StatusRequestTimeout // RFC 7231, 6.5.7
|
||||
StatusConflict = http.StatusConflict // RFC 7231, 6.5.8
|
||||
StatusGone = http.StatusGone // RFC 7231, 6.5.9
|
||||
StatusLengthRequired = http.StatusLengthRequired // RFC 7231, 6.5.10
|
||||
StatusPreconditionFailed = http.StatusPreconditionFailed // RFC 7232, 4.2
|
||||
StatusRequestEntityTooLarge = http.StatusRequestEntityTooLarge // RFC 7231, 6.5.11
|
||||
StatusRequestURITooLong = http.StatusRequestURITooLong // RFC 7231, 6.5.12
|
||||
StatusUnsupportedMediaType = http.StatusUnsupportedMediaType // RFC 7231, 6.5.13
|
||||
StatusRequestedRangeNotSatisfiable = http.StatusRequestedRangeNotSatisfiable // RFC 7233, 4.4
|
||||
StatusExpectationFailed = http.StatusExpectationFailed // RFC 7231, 6.5.14
|
||||
StatusTeapot = http.StatusTeapot // RFC 7168, 2.3.3
|
||||
StatusMisdirectedRequest = http.StatusMisdirectedRequest // RFC 7540, 9.1.2
|
||||
StatusUnprocessableEntity = http.StatusUnprocessableEntity // RFC 4918, 11.2
|
||||
StatusLocked = http.StatusLocked // RFC 4918, 11.3
|
||||
StatusFailedDependency = http.StatusFailedDependency // RFC 4918, 11.4
|
||||
StatusTooEarly = http.StatusTooEarly // RFC 8470, 5.2.
|
||||
StatusUpgradeRequired = http.StatusUpgradeRequired // RFC 7231, 6.5.15
|
||||
StatusPreconditionRequired = http.StatusPreconditionRequired // RFC 6585, 3
|
||||
StatusTooManyRequests = http.StatusTooManyRequests // RFC 6585, 4
|
||||
StatusRequestHeaderFieldsTooLarge = http.StatusRequestHeaderFieldsTooLarge // RFC 6585, 5
|
||||
StatusUnavailableForLegalReasons = http.StatusUnavailableForLegalReasons // RFC 7725, 3
|
||||
// Unofficial Client Errors.
|
||||
StatusPageExpired = context.StatusPageExpired
|
||||
StatusBlockedByWindowsParentalControls = context.StatusBlockedByWindowsParentalControls
|
||||
StatusInvalidToken = context.StatusInvalidToken
|
||||
StatusTokenRequired = context.StatusTokenRequired
|
||||
//
|
||||
StatusInternalServerError = http.StatusInternalServerError
|
||||
StatusNotImplemented = http.StatusNotImplemented
|
||||
StatusBadGateway = http.StatusBadGateway
|
||||
StatusServiceUnavailable = http.StatusServiceUnavailable
|
||||
StatusGatewayTimeout = http.StatusGatewayTimeout
|
||||
StatusHTTPVersionNotSupported = http.StatusHTTPVersionNotSupported
|
||||
StatusVariantAlsoNegotiates = http.StatusVariantAlsoNegotiates
|
||||
StatusInsufficientStorage = http.StatusInsufficientStorage
|
||||
StatusLoopDetected = http.StatusLoopDetected
|
||||
StatusNotExtended = http.StatusNotExtended
|
||||
StatusNetworkAuthenticationRequired = http.StatusNetworkAuthenticationRequired
|
||||
StatusInternalServerError = http.StatusInternalServerError // RFC 7231, 6.6.1
|
||||
StatusNotImplemented = http.StatusNotImplemented // RFC 7231, 6.6.2
|
||||
StatusBadGateway = http.StatusBadGateway // RFC 7231, 6.6.3
|
||||
StatusServiceUnavailable = http.StatusServiceUnavailable // RFC 7231, 6.6.4
|
||||
StatusGatewayTimeout = http.StatusGatewayTimeout // RFC 7231, 6.6.5
|
||||
StatusHTTPVersionNotSupported = http.StatusHTTPVersionNotSupported // RFC 7231, 6.6.6
|
||||
StatusVariantAlsoNegotiates = http.StatusVariantAlsoNegotiates // RFC 2295, 8.1
|
||||
StatusInsufficientStorage = http.StatusInsufficientStorage // RFC 4918, 11.5
|
||||
StatusLoopDetected = http.StatusLoopDetected // RFC 5842, 7.2
|
||||
StatusNotExtended = http.StatusNotExtended // RFC 2774, 7
|
||||
StatusNetworkAuthenticationRequired = http.StatusNetworkAuthenticationRequired // RFC 6585, 6
|
||||
// Unofficial Server Errors.
|
||||
StatusBandwidthLimitExceeded = context.StatusBandwidthLimitExceeded
|
||||
StatusInvalidSSLCertificate = context.StatusInvalidSSLCertificate
|
||||
|
|
Loading…
Reference in New Issue
Block a user