blob: 5ebaa6a3a0f8bfafc69093ce3168594e1b4896d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package gemini
// Gemini status codes as defined in the Gemini spec Appendix 1.
const (
StatusInput = 10
StatusSuccess = 20
StatusSuccessEndOfClientCertificateSession = 21
StatusRedirect = 30
StatusRedirectTemporary = 30
StatusRedirectPermanent = 31
StatusTemporaryFailure = 40
StatusUnavailable = 41
StatusCGIError = 42
StatusProxyError = 43
StatusSlowDown = 44
StatusPermanentFailure = 50
StatusNotFound = 51
StatusGone = 52
StatusProxyRequestRefused = 53
StatusBadRequest = 59
StatusClientCertificateRequired = 60
StatusTransientCertificateRequested = 61
StatusAuthorisedCertificateRequired = 62
StatusCertificateNotAccepted = 63
StatusFutureCertificateRejected = 64
StatusExpiredCertificateRejected = 65
)
// SimplifyStatus simplify the response status by omiting the detailed second digit of the status code.
func SimplifyStatus(status int) int {
return (status / 10) * 10
}
|