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 ClientSocketInvalid = 145,
157 ClientHttpsTransportMissing,
158 ClientProtocolStorageTooSmall,
159 ClientHostStorageTooSmall,
160 ClientResponseListenerUnavailable,
161 ClientBodyStreamPoolMismatch,
162 ClientTransformReadablePoolMismatch,
163 ClientTransformWritablePoolMismatch,
164 ClientDecoderListenerUnavailable,
165 ClientInformationalResponseUnsupported = 158,
166 ClientResponseIncomplete,
167 WebSocketBase64OutputTooSmall,
168 WebSocketBase64LengthInvalid,
169 WebSocketBase64PaddingInvalid,
170 WebSocketBase64CharacterInvalid,
171 WebSocketBase64DecodeOutputTooSmall,
172 WebSocketSha1ProviderUnavailable,
173 WebSocketSha1ModeInvalid,
174 WebSocketSha1DigestSizeInvalid,
175 WebSocketNonceLengthInvalid,
176 WebSocketClientKeyLengthInvalid,
177 WebSocketClientKeyDecodedLengthInvalid,
178 WebSocketUpgradeStatusInvalid,
179 WebSocketUpgradeHeaderInvalid,
180 WebSocketConnectionHeaderInvalid,
181 WebSocketAcceptHeaderInvalid,
182 WebSocketServerRequestNotAcceptable,
183 WebSocketRejectAcceptedRequest,
184 WebSocketFrameReservedBitsUnsupported,
185 WebSocketOpcodeUnsupported,
186 WebSocketFrameLengthInvalid,
187 WebSocketFramePayloadProgressInvalid,
188 WebSocketFrameMaskInvalid,
189 WebSocketControlFrameFragmented,
190 WebSocketControlFrameTooLarge,
191 WebSocketContinuationUnexpected,
192 WebSocketContinuationExpected,
193 WebSocketFrameAlreadyInProgress,
194 WebSocketFrameHeaderOutputTooSmall,
195 WebSocketFrameMissing,
196 WebSocketFramePayloadExceedsLength,
197 WebSocketFramePayloadIncomplete,
198 WebSocketMessageMissing,
199 WebSocketMessageStorageTooSmall,
200 WebSocketMaskKeyMissing,
201 WebSocketFramePayloadLengthMismatch,
202 WebSocketFrameOutputTooSmall,
203 WebSocketDataOpcodeRequired,
204 WebSocketCloseStatusRequired,
205 WebSocketClosePayloadMalformed,
206 WebSocketControlBackpressure,
207 WebSocketAutomaticControlOutputTooSmall,
208 WebSocketTransportInvalid,
209 WebSocketPumpListenerUnavailable,
210 WebSocketPumpNotAttached = 205,
211 WebSocketFrameEmpty,
212 WebSocketHubFull,
213 WebSocketHubClientIndexInvalid,
214};
215
217static constexpr ResultCategory HttpResultCategory = ResultCategory(17);
218
220} // namespace SC
HttpError
Stable portable failures owned by Http.
Definition HttpError.h:15