mirror of
https://github.com/aler9/gortsplib
synced 2025-10-12 18:40:07 +08:00
add status messages
This commit is contained in:
@@ -4,6 +4,7 @@ package gortsplib
|
||||
type StatusCode int
|
||||
|
||||
// https://tools.ietf.org/html/rfc7826#section-17
|
||||
|
||||
const (
|
||||
StatusContinue StatusCode = 100
|
||||
|
||||
@@ -30,7 +31,6 @@ const (
|
||||
StatusRequestURITooLong = 414
|
||||
StatusUnsupportedMediaType = 415
|
||||
StatusParameterNotUnderstood = 451
|
||||
StatusIllegalConferenceIdentifier = 452
|
||||
StatusNotEnoughBandwidth = 453
|
||||
StatusSessionNotFound = 454
|
||||
StatusMethodNotValidInThisState = 455
|
||||
|
56
statusmessages.go
Normal file
56
statusmessages.go
Normal file
@@ -0,0 +1,56 @@
|
||||
package gortsplib
|
||||
|
||||
// StatusMessages is a map that contains the strings associated with every status code.
|
||||
var StatusMessages = map[StatusCode]string{
|
||||
StatusContinue: "Continue",
|
||||
|
||||
StatusOK: "OK",
|
||||
|
||||
StatusMovedPermanently: "Moved Permanently",
|
||||
StatusFound: "Found",
|
||||
StatusSeeOther: "See Other",
|
||||
StatusNotModified: "Not Modified",
|
||||
StatusUseProxy: "Use Proxy",
|
||||
|
||||
StatusBadRequest: "Bad Request",
|
||||
StatusUnauthorized: "Unauthorized",
|
||||
StatusPaymentRequired: "Payment Required",
|
||||
StatusForbidden: "Forbidden",
|
||||
StatusNotFound: "Not Found",
|
||||
StatusMethodNotAllowed: "Method Not Allowed",
|
||||
StatusNotAcceptable: "Not Acceptable",
|
||||
StatusProxyAuthRequired: "Proxy Auth Required",
|
||||
StatusRequestTimeout: "Request Timeout",
|
||||
StatusGone: "Gone",
|
||||
StatusPreconditionFailed: "Precondition Failed",
|
||||
StatusRequestEntityTooLarge: "Request Entity Too Large",
|
||||
StatusRequestURITooLong: "Request URI Too Long",
|
||||
StatusUnsupportedMediaType: "Unsupported Media Type",
|
||||
StatusParameterNotUnderstood: "Parameter Not Understood",
|
||||
StatusNotEnoughBandwidth: "Not Enough Bandwidth",
|
||||
StatusSessionNotFound: "Session Not Found",
|
||||
StatusMethodNotValidInThisState: "Method Not Valid In This State",
|
||||
StatusHeaderFieldNotValidForResource: "Header Field Not Valid for Resource",
|
||||
StatusInvalidRange: "Invalid Range",
|
||||
StatusParameterIsReadOnly: "Parameter Is Read-Only",
|
||||
StatusAggregateOperationNotAllowed: "Aggregate Operation Not Allowed",
|
||||
StatusOnlyAggregateOperationAllowed: "Only Aggregate Operation Allowed",
|
||||
StatusUnsupportedTransport: "Unsupported Transport",
|
||||
StatusDestinationUnreachable: "Destination Unreachable",
|
||||
StatusDestinationProhibited: "Destination Prohibited",
|
||||
StatusDataTransportNotReadyYet: "Data Transport Not Ready Yet",
|
||||
StatusNotificationReasonUnknown: "Notification Reason Unknown",
|
||||
StatusKeyManagementError: "Key Management Error",
|
||||
StatusConnectionAuthorizationRequired: "Connection Authorization Required",
|
||||
StatusConnectionCredentialsNotAccepted: "Connection Credentials Not Accepted",
|
||||
StatusFailureToEstablishSecureConnection: "Failure to Establish Secure Connection",
|
||||
|
||||
StatusInternalServerError: "Internal Server Error",
|
||||
StatusNotImplemented: "Not Implemented",
|
||||
StatusBadGateway: "Bad Gateway",
|
||||
StatusServiceUnavailable: "Service Unavailable",
|
||||
StatusGatewayTimeout: "Gateway Timeout",
|
||||
StatusRTSPVersionNotSupported: "RTSP Version Not Supported",
|
||||
StatusOptionNotSupported: "Option Not Supported",
|
||||
StatusProxyUnavailable: "Proxy Unavailable",
|
||||
}
|
Reference in New Issue
Block a user