Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
HttpError.h
1// Copyright (c) Stefano Cristiano
2// SPDX-License-Identifier: MIT
3#pragma once
4
5#include "../Common/Result.h"
6
7namespace SC
8{
11
14enum class HttpError : uint32_t
15{
16 MalformedPercentEscape = 1,
17 DecodedOutputTooSmall,
18 RequestTargetEmpty,
19 RequestTargetWhitespace,
20 UnsupportedRequestTargetForm,
21 MalformedURL,
22 UnsupportedProtocol,
23 InvalidURLPath,
24 InvalidURLHost,
25 InvalidURLUserInfo,
26 InvalidIPv6Host,
27 InvalidURLPort,
28 AllowHeaderOutputTooSmall,
29 MultipartDispositionEmpty,
30 MultipartDispositionTypeEmpty,
31 MultipartBoundaryInvalid,
32 MultipartBoundaryTooLong,
33 MultipartBoundaryCandidateTooLong,
34 MultipartMalformedSyntax,
35 MultipartSpanInvalid,
36 AuthorizationCredentialsMissing,
37 AuthorizationNotBearer,
38 AuthorizationNotBasic,
39 BasicBase64Incomplete,
40 BasicBase64Invalid,
41 BasicBase64PaddingInvalid,
42 BasicBase64TrailingData,
43 BasicDecodeOutputTooSmall,
44 BasicPasswordSeparatorMissing,
45 BasicUsernameContainsColon,
46 AuthorizationOutputTooSmall,
47 BearerTokenEmpty,
48 BasicCredentialsEmpty,
49 SetCookieHeaderEmpty,
50 SetCookieNameValueMissing,
51 SetCookieNameEmpty,
52 SetCookieOutputTooSmall,
53 CacheControlConflictingVisibility,
54 CacheControlOutputTooSmall,
55 CacheControlNoDirectives,
56 HeaderStorageExhausted,
57 HeaderSizeLimitExceeded,
58 HeaderTokenLimitExceeded,
59 HeaderOutputTooSmall,
60 MultipartBodyOutputTooSmall,
61 ContentLengthFormattingFailed,
62 MultipartWriterBoundaryEmpty,
63 MultipartWriterBoundaryUnsafe,
64 MultipartWriterBoundaryMissing,
65 MultipartWriterFieldNameEmpty,
66 MultipartWriterFieldNameUnsafe,
67 MultipartWriterFileNameUnsafe,
68 MultipartWriterContentTypeUnsafe,
69 MultipartWriterPartLimitExceeded,
70 BodyExceedsContentLength,
71 BodyFramingHeadersConflict,
72 TransferEncodingUnsupported,
73 UnexpectedBodyData,
74 BodyStreamConsumptionMismatch,
75 ChunkSizeOverflow,
76 ChunkSizeInvalid,
77 ChunkHeaderMalformed,
78 ChunkTerminatorMalformed,
79 ChunkTrailersUnsupported,
80 ChunkTrailerTerminatorMalformed,
81 PipelinedBodyUnsupported,
82 ChunkHeaderOutputTooSmall,
83 ChunkedDestinationMissing,
84 HeadersAlreadySent,
85 HeaderStartMissing,
86 MessageStartAlreadyWritten,
87 KeepAliveDisabled,
88 ContentLengthTransferEncodingConflict,
89 DestinationStreamMissing,
90 HeadersNotSent,
91 ResponseStatusUnsupported,
92 ResponseStatusInvalid,
93 ResponseReasonPhraseEmpty,
94 ResponseReasonPhraseInvalid,
95 ResponseStatusFormattingFailed,
96 RedirectStatusInvalid,
97 RedirectLocationEmpty,
98 ContentEncodingUnsupported,
99 CompressedBodyEncodingInvalid = 85,
100 MultipartWriterMissing,
101 PoolActiveConnectionsRemain,
102 PoolHeaderStorageEmpty,
103 PoolReadQueueConfigurationInvalid,
104 PoolBufferQueueConfigurationInvalid,
105 PoolReadQueueStorageTooSmall,
106 PoolWriteQueueStorageTooSmall,
107 PoolBufferQueueStorageTooSmall,
108 PoolHeaderStorageTooSmall,
109 PoolStreamStorageTooSmall,
110 ParserMethodMalformed,
111 ParserRequestTargetMalformed,
112 ParserVersionMalformed,
113 ParserStatusCodeMalformed,
114 ParserStatusTextMalformed,
115 ParserHeaderNameMalformed,
116 ParserHeaderValueMalformed,
117 ParserContentLengthMalformed,
118 ParserConnectionHeaderMalformed,
119 ParserHeaderTerminatorMalformed,
120 ParserSpanInvalid,
121 HeaderBlockIncomplete,
122 ServerReadQueueEmpty,
123 ServerWriteQueueEmpty,
124 ServerBufferPoolEmpty,
125 ServerResizeAddressChanged,
126 ServerResizeActiveConnection,
127 ServerAlreadyStarted,
128 ServerNotInitialized,
129 ServerExternalListenerRequired,
130 ServerConnectionSlotUnavailable,
131 ServerStopRequired,
132 ServerNotStarted,
133 ServerNotStopping,
134 ServerDataListenerUnavailable,
135 FileServerAlreadyInitialized,
136 FileServerDirectoryUnavailable,
137 FileServerRequestTargetNotPath,
138 FileServerPathEmpty,
139 FileServerPathCharacterInvalid,
140 FileServerDotSegment,
141 FileServerParentSegment,
142 FileServerDateConversionFailed,
143 FileServerDateOutputTooSmall,
144 FileServerContentRangeOutputTooSmall,
145 FileServerETagOutputTooSmall,
146 ClientClosed,
147 ClientBodyStreamMissing,
148 ClientNotInitialized,
149 ClientConnectionUpgraded,
150 ClientRequestInProgress,
151 ClientUpgradeHeadersMissing,
152 ClientUpgradeStatusInvalid,
153 ClientUserInfoUnsupported,
154 ClientReconnectNotPending,
155 ClientReconnectListenerUnavailable,
156
157 // Keep this ID stable when backporting without the transport-owner error range (209-213).
158 ServerEndListenerUnavailable = 214,
159
160 ClientSocketInvalid = 145,
161 ClientHttpsTransportMissing,
162 ClientProtocolStorageTooSmall,
163 ClientHostStorageTooSmall,
164 ClientResponseListenerUnavailable,
165 ClientBodyStreamPoolMismatch,
166 ClientTransformReadablePoolMismatch,
167 ClientTransformWritablePoolMismatch,
168 ClientDecoderListenerUnavailable,
169 ClientInformationalResponseUnsupported = 158,
170 ClientResponseIncomplete,
171 WebSocketBase64OutputTooSmall,
172 WebSocketBase64LengthInvalid,
173 WebSocketBase64PaddingInvalid,
174 WebSocketBase64CharacterInvalid,
175 WebSocketBase64DecodeOutputTooSmall,
176 WebSocketSha1ProviderUnavailable,
177 WebSocketSha1ModeInvalid,
178 WebSocketSha1DigestSizeInvalid,
179 WebSocketNonceLengthInvalid,
180 WebSocketClientKeyLengthInvalid,
181 WebSocketClientKeyDecodedLengthInvalid,
182 WebSocketUpgradeStatusInvalid,
183 WebSocketUpgradeHeaderInvalid,
184 WebSocketConnectionHeaderInvalid,
185 WebSocketAcceptHeaderInvalid,
186 WebSocketServerRequestNotAcceptable,
187 WebSocketRejectAcceptedRequest,
188 WebSocketFrameReservedBitsUnsupported,
189 WebSocketOpcodeUnsupported,
190 WebSocketFrameLengthInvalid,
191 WebSocketFramePayloadProgressInvalid,
192 WebSocketFrameMaskInvalid,
193 WebSocketControlFrameFragmented,
194 WebSocketControlFrameTooLarge,
195 WebSocketContinuationUnexpected,
196 WebSocketContinuationExpected,
197 WebSocketFrameAlreadyInProgress,
198 WebSocketFrameHeaderOutputTooSmall,
199 WebSocketFrameMissing,
200 WebSocketFramePayloadExceedsLength,
201 WebSocketFramePayloadIncomplete,
202 WebSocketMessageMissing,
203 WebSocketMessageStorageTooSmall,
204 WebSocketMaskKeyMissing,
205 WebSocketFramePayloadLengthMismatch,
206 WebSocketFrameOutputTooSmall,
207 WebSocketDataOpcodeRequired,
208 WebSocketCloseStatusRequired,
209 WebSocketClosePayloadMalformed,
210 WebSocketControlBackpressure,
211 WebSocketAutomaticControlOutputTooSmall,
212 WebSocketTransportInvalid,
213 WebSocketPumpListenerUnavailable,
214 WebSocketPumpNotAttached = 205,
215 WebSocketFrameEmpty,
216 WebSocketHubFull,
217 WebSocketHubClientIndexInvalid,
218 TransportOwnerRequired,
219 TransportAlreadyClaimed,
220 TransportHooksAlreadyConfigured,
221 TransportOwnerMismatch,
222 TransportMutationRequiresQuiescence,
223};
224
226static constexpr ResultCategory HttpResultCategory = ResultCategory(17);
227
229} // namespace SC
HttpError
Stable portable failures owned by Http.
Definition HttpError.h:15