1 #Region "Microsoft.VisualBasic::5fc21762f647132d1d6f9df1ea161866, Microsoft.VisualBasic.Core\Extensions\WebServices\HTTP_RFC.vb"
2
3     ' Author:
4     
5     '       asuka (amethyst.asuka@gcmodeller.org)
6     '       xie (genetics@smrucc.org)
7     '       xieguigang (xie.guigang@live.com)
8     
9     ' Copyright (c) 2018 GPL3 Licensed
10     
11     
12     ' GNU GENERAL PUBLIC LICENSE (GPL3)
13     
14     
15     ' This program is free software: you can redistribute it and/or modify
16     ' it under the terms of the GNU General Public License as published by
17     ' the Free Software Foundation, either version 3 of the License, or
18     ' (at your option) any later version.
19     
20     ' This program is distributed in the hope that it will be useful,
21     ' but WITHOUT ANY WARRANTY; without even the implied warranty of
22     ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23     ' GNU General Public License for more details.
24     
25     ' You should have received a copy of the GNU General Public License
26     ' along with this program. If not, see <http://www.gnu.org/licenses/>.
27
28
29
30     ' /********************************************************************************/
31
32     ' Summaries:
33
34     '     Module HTTP_RFC
35     
36     
37     
38     
39     ' /********************************************************************************/
40
41 #End Region
42
43 Namespace Net.Http
44
45     ''' <summary>
46     ''' The following is a list of Hypertext Transfer Protocol (HTTP) response status codes. This includes codes from IETF internet standards 
47     ''' as well as other IETF RFCs, other specifications and some additional commonly used codes. The first digit of the status code specifies 
48     ''' one of five classes of response; the bare minimum for an HTTP client is that it recognises these five classes. The phrases used are the 
49     ''' standard examples, but any human-readable alternative can be provided. Unless otherwise stated, the status code is part of the HTTP/1.1 
50     ''' standard (RFC 7231).
51     '''
52     ''' The Internet Assigned Numbers Authority (IANA) maintains the official registry Of HTTP status codes.
53     '''
54     ''' Microsoft IIS sometimes uses additional Decimal Sub-codes To provide more specific information, but these are Not listed here.
55     ''' </summary>
56     Public Module HTTP_RFC
57
58 #Region "1xx Informational"
59
60         ''' <summary>
61         ''' 100 Continue |
62         ''' This means that the server has received the request headers, And that the client should proceed To send the request body 
63         ''' (In the Case Of a request For which a body needs To be sent; For example, a POST request). If the request body Is large, 
64         ''' sending it To a server When a request has already been rejected based upon inappropriate headers Is inefficient. 
65         ''' To have a server check If the request could be accepted based On the request's headers alone, a client must send Expect: 
66         ''' 100-continue as a header in its initial request and check if a 100 Continue status code is received in response before 
67         ''' continuing (or receive 417 Expectation Failed and not continue).
68         ''' </summary>
69
70         Public Const RFC_CONTINUTE As Long = 100
71         ''' <summary>
72         ''' 101 Switching Protocols |
73         ''' This means the requester has asked the server To switch protocols And the server Is acknowledging that it will Do so.
74         ''' </summary>
75
76         Public Const RFC_SWITCHING_PROTOCOLS As Long = 101
77         ''' <summary>
78         ''' 102 Processing (WebDAV; RFC 2518) |
79         ''' As a WebDAV request may contain many sub-requests involving file operations, it may take a long time to complete the request. 
80         ''' This code indicates that the server has received And Is processing the request, but no response Is available yet.[3] 
81         ''' This prevents the client from timing out And assuming the request was lost.
82         ''' </summary>
83
84         Public Const RFC_PROCESSING As Long = 102
85 #End Region
86
87 #Region "2xx Success"
88
89         ''' <summary>
90         ''' 200 OK |
91         ''' Standard response For successful HTTP requests. The actual response will depend On the request method used. In a Get request, 
92         ''' the response will contain an entity corresponding To the requested resource. In a POST request, the response will contain an 
93         ''' entity describing Or containing the result Of the action.
94         ''' (由于可能会修改附带一些其他的元素据信息,所以只读属性不会使用简写的形式的,而是需要重新生成新的对象实例以防止数据污染)
95         ''' </summary>
96
97         Public Const RFC_OK As Long = 200
98
99         ''' <summary>
100         ''' 201 Created |
101         ''' The request has been fulfilled And resulted In a New resource being created.
102         ''' </summary>
103
104         Public Const RFC_CREATED As Long = 201
105
106         ''' <summary>
107         ''' 202 Accepted |
108         ''' The request has been accepted For processing, but the processing has Not been completed. The request might Or might Not eventually be acted upon, 
109         ''' As it might be disallowed When processing actually takes place.
110         ''' </summary>
111
112         Public Const RFC_ACCEPTED As Long = 202
113
114         ''' <summary>
115         ''' 203 Non-Authoritative Information (since HTTP/1.1) |
116         ''' The server successfully processed the request, but Is returning information that may be from another source.
117         ''' </summary>
118
119         Public Const RFC_NON_AUTH_INFO As Long = 203
120
121         ''' <summary>
122         ''' 204 No Content |
123         ''' The server successfully processed the request, but Is Not returning any content.
124         ''' </summary>
125
126         Public Const RFC_NO_CONTENT As Long = 204
127
128         ''' <summary>
129         ''' 205 Reset Content |
130         ''' The server successfully processed the request, but Is Not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.
131         ''' </summary>
132
133         Public Const RFC_RESET_CONTENT As Long = 205
134
135         ''' <summary>
136         ''' 206 Partial Content (RFC 7233) |
137         ''' The server Is delivering only part Of the resource (Byte serving) due To a range header sent by the client. 
138         ''' The range header Is used by HTTP clients To enable resuming Of interrupted downloads, Or split a download into multiple simultaneous streams.
139         ''' </summary>
140
141         Public Const RFC_PARTIAL_CONTENT As Long = 206
142
143         ''' <summary>
144         ''' 207 Multi-Status (WebDAV; RFC 4918) |
145         ''' The message body that follows Is an XML message And can contain a number Of separate response codes, depending On how many Sub-requests were made.[4]
146         ''' </summary>
147
148         Public Const RFC_MULTI_STATUS As Long = 207
149         ''' <summary>
150         ''' 208 Already Reported (WebDAV; RFC 5842) |
151         ''' The members Of a DAV binding have already been enumerated In a previous reply To this request, And are Not being included again.
152         ''' </summary>
153
154         Public Const RFC_ALREADY_REPORTED As Long = 208
155         ''' <summary>
156         ''' 226 IM Used (RFC 3229) |
157         ''' The server has fulfilled a request For the resource, And the response Is a representation Of the result Of one Or more instance-manipulations applied To the current instance.[5]
158         ''' </summary>
159
160         Public Const RFC_IM_USED As Long = 226
161 #End Region
162
163 #Region "3xx Redirection"
164
165         ''' <summary>
166         ''' 300 Multiple Choices |
167         ''' Indicates multiple options For the resource that the client may follow. It, For instance, could be used To present different 
168         ''' format options For video, list files With different extensions, Or word sense disambiguation.
169         ''' </summary>
170
171         Public Const RFC_MULTI_CHOICES As Long = 300
172         ''' <summary>
173         ''' 301 Moved Permanently |
174         ''' This And all future requests should be directed to the given URI.
175         ''' </summary>
176
177         Public Const RFC_MOVED_PERMANENTLY As Long = 301
178         ''' <summary>
179         ''' 302 Found |
180         ''' This Is an example of industry practice contradicting the standard. The HTTP/1.0 specification (RFC 1945) required the client 
181         ''' to perform a temporary redirect (the original describing phrase was "Moved Temporarily"),[6] but popular browsers implemented 
182         ''' 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 And 307 to distinguish between the 
183         ''' two behaviours.[7] However, some Web applications And frameworks use the 302 status code as if it were the 303.[8]
184         ''' </summary>
185
186         Public Const RFC_FOUND As Long = 302
187         ''' <summary>
188         ''' 303 See Other (since HTTP/1.1) |
189         ''' The response To the request can be found under another URI Using a Get method. When received In response To a POST (Or PUT/DELETE), 
190         ''' it should be assumed that the server has received the data And the redirect should be issued With a separate Get message.
191         ''' </summary>
192
193         Public Const RFC_SEE_OTHER As Long = 303
194         ''' <summary>
195         ''' 304 Not Modified (RFC 7232) |
196         ''' Indicates that the resource has Not been modified since the version specified by the request headers If-Modified-Since Or If-None-Match. 
197         ''' This means that there Is no need To retransmit the resource, since the client still has a previously-downloaded copy.
198         ''' </summary>
199
200         Public Const RFC_NOT_MODIFIED As Long = 304
201         ''' <summary>
202         ''' 305 Use Proxy (since HTTP/1.1) |
203         ''' The requested resource Is only available through a proxy, whose address Is provided In the response. Many HTTP clients 
204         ''' (such As Mozilla[9] And Internet Explorer) Do Not correctly handle responses With this status code, primarily For security reasons.[10]
205         ''' </summary>
206
207         Public Const RFC_USE_PROXY As Long = 305
208         ''' <summary>
209         ''' 306 Switch Proxy |
210         ''' No longer used. Originally meant "Subsequent requests should use the specified proxy."[11]
211         ''' </summary>
212
213         Public Const RFC_SWITCH_PROXY As Long = 306
214         ''' <summary>
215         ''' 307 Temporary Redirect (since HTTP/1.1) |
216         ''' In this case, the request should be repeated with another URI; however, future requests should still use the original URI. 
217         ''' In contrast to how 302 was historically implemented, the request method Is Not allowed to be changed when reissuing the original request. 
218         ''' For instance, a POST request should be repeated using another POST request.[12]
219         ''' </summary>
220
221         Public Const RFC_TEMP_REDIRECT As Long = 307
222         ''' <summary>
223         ''' 308 Permanent Redirect (RFC 7538) |
224         ''' The request, and all future requests should be repeated Using another URI. 307 And 308 (As proposed) parallel the behaviours 
225         ''' Of 302 And 301, but Do Not allow the HTTP method To change. So, For example, submitting a form To a permanently redirected resource may Continue smoothly.[13]
226         ''' </summary>
227
228         Public Const RFC_PERMANENT_REDIRECT As Long = 308
229         ''' <summary>
230         ''' 308 Resume Incomplete (Google) |
231         ''' This code Is used In the Resumable HTTP Requests Proposal To Resume aborted PUT Or POST requests.[14]
232         ''' </summary>
233
234         Public Const RFC_RESUME_INCOMPLETE As Long = 308
235 #End Region
236
237 #Region "4xx Client Error"
238
239         ''' <summary>
240         ''' 400 Bad Request |
241         ''' The server cannot Or will Not process the request due To something that Is perceived To be a client Error (e.g., malformed request syntax, 
242         ''' invalid request message framing, Or deceptive request routing).[15]
243         ''' </summary>
244
245         Public Const RFC_BAD_REQUEST As Long = 400
246
247         ''' <summary>
248         ''' 401 Unauthorized (RFC 7235) |
249         ''' Similar to 403 Forbidden, but specifically for use when authentication Is required And has failed Or has Not yet been provided. 
250         ''' The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource. 
251         ''' See Basic access authentication And Digest access authentication.(证书未认证)
252         ''' </summary>
253
254         Public Const RFC_UNAUTHORIZED As Long = 401
255
256         ''' <summary>
257         ''' 402 Payment Required |
258         ''' Reserved for future use. The original intention was that this code might be used as part of some form of digital cash Or micropayment scheme, 
259         ''' but that has Not happened, And this code Is Not usually used. YouTube uses this status if a particular IP address has made excessive requests, 
260         ''' And requires the person to enter a CAPTCHA.[citation needed]
261         ''' </summary>
262
263         Public Const RFC_PAYMENT_REQUIRED As Long = 402
264         ''' <summary>
265         ''' 403 Forbidden |
266         ''' The request was a valid request, but the server Is refusing To respond To it. Unlike a 401 Unauthorized response, authenticating will make no difference.
267         ''' (被封号了)
268         ''' </summary>
269
270         Public Const RFC_FORBIDDEN As Long = 403
271
272         ''' <summary>
273         ''' 404 Not Found |
274         ''' The requested resource could Not be found but may be available again In the future. Subsequent requests by the client are permissible.
275         ''' </summary>
276
277         Public Const RFC_NOT_FOUND As Long = 404
278
279         ''' <summary>
280         ''' 405 Method Not Allowed |
281         ''' A request was made Of a resource Using a request method Not supported by that resource; For example, 
282         ''' Using Get On a form which requires data To be presented via POST, Or Using PUT On a read-only resource.
283         ''' </summary>
284
285         Public Const RFC_METHOD_NOT_ALLOWED As Long = 405
286         ''' <summary>
287         ''' 406 Not Acceptable |
288         ''' The requested resource Is only capable Of generating content Not acceptable according To the Accept headers sent In the request.
289         ''' </summary>
290
291         Public Const RFC_NOT_ACCEPTABLE As Long = 406
292         ''' <summary>
293         ''' 407 Proxy Authentication Required (RFC 7235) |
294         ''' The client must first authenticate itself With the proxy.
295         ''' </summary>
296
297         Public Const RFC_PROXY_AUTH_REQUIRED As Long = 407
298         ''' <summary>
299         ''' 408 Request Timeout |
300         ''' The server timed out waiting For the request. According To HTTP specifications: 
301         ''' "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time."
302         ''' (请求超时)
303         ''' </summary>
304
305         Public Const RFC_REQUEST_TIMEOUT As Long = 408
306
307         ''' <summary>
308         ''' 409 Conflict |
309         ''' Indicates that the request could Not be processed because Of conflict In the request, such As an edit conflict In the Case Of multiple updates.
310         ''' </summary>
311
312         Public Const RFC_CONFLICT As Long = 409
313         ''' <summary>
314         ''' 410 Gone |
315         ''' Indicates that the resource requested Is no longer available And will Not be available again. 
316         ''' This should be used When a resource has been intentionally removed And the resource should be purged. 
317         ''' Upon receiving a 410 status code, the client should Not request the resource again In the future. 
318         ''' Clients such As search engines should remove the resource from their indices.[16] Most use cases 
319         ''' Do Not require clients And search engines To purge the resource, And a "404 Not Found" may be used instead.
320         ''' </summary>
321
322         Public Const RFC_GONE As Long = 410
323
324         ''' <summary>
325         ''' 411 Length Required |
326         ''' The request did Not specify the length Of its content, which Is required by the requested resource.
327         ''' </summary>
328
329         Public Const RFC_LENGTH_REQUIRED As Long = 411
330         ''' <summary>
331         ''' 412 Precondition Failed (RFC 7232) |
332         ''' The server does Not meet one Of the preconditions that the requester put On the request.
333         ''' </summary>
334
335         Public Const RFC_PRECONDITION_FAILED As Long = 412
336
337         ''' <summary>
338         ''' 413 Payload Too Large (RFC 7231) |
339         ''' The request Is larger than the server Is willing Or able To process. Called "Request Entity Too Large " previously.
340         ''' </summary>
341
342         Public Const RFC_PAYLOAD_TOO_LARGE As Long = 413
343         ''' <summary>
344         ''' 414 Request-URI ToLong |
345         ''' The URI provided was too Long For the server To process. Often the result Of too much data being encoded As a query-String Of a Get request, In which Case it should be converted To a POST request.
346         ''' </summary>
347
348         Public Const RFC_URI_TOO_LONG As Long = 414
349         ''' <summary>
350         ''' 415 Unsupported Media Type |
351         ''' The request entity has a media type which the server Or resource does Not support. For example, the client uploads an image As image/svg+xml, but the server requires that images use a different format.
352         ''' </summary>
353
354         Public Const RFC_UNSUPPORTED_MEDIA_TYPE As Long = 415
355         ''' <summary>
356         ''' 416 Requested Range Not Satisfiable (RFC 7233) |
357         ''' The client has asked For a portion Of the file (Byte serving), but the server cannot supply that portion. For example, If the client asked For a part Of the file that lies beyond the End Of the file.
358         ''' </summary>
359
360         Public Const RFC_RANGE_NOT_SATISFIABLE As Long = 416
361         ''' <summary>
362         ''' 417 Expectation Failed |
363         ''' The server cannot meet the requirements Of the Expect request-header field.
364         ''' </summary>
365
366         Public Const RFC_EXPECTATION_FAILED As Long = 417
367
368         ''' <summary>
369         ''' 418 I'm a teapot (RFC 2324) |
370         ''' This code was defined In 1998 As one Of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, 
371         ''' and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by tea pots requested to brew coffee.
372         ''' </summary>
373
374         Public Const RFC_IM_TEAPOT As Long = 418
375         ''' <summary>
376         ''' 419 Authentication Timeout (Not in RFC 2616) |
377         ''' Not a part of the HTTP standard, 419 Authentication Timeout denotes that previously valid authentication has expired. 
378         ''' It Is used as an alternative to 401 Unauthorized in order to differentiate from otherwise authenticated clients being denied access to specific server resources.[citation needed]
379         ''' </summary>
380
381         Public Const RFC_AUTH_TIMEOUT As Long = 419
382         ''' <summary>
383         ''' 420 Method Failure (Spring Framework) |
384         ''' Not part of the HTTP standard, but defined by Spring in the HttpStatus class to be used when a method failed. This status code Is deprecated by Spring.
385         ''' </summary>
386
387         Public Const RFC_METHOD_FAILURE As Long = 420
388         ''' <summary>
389         ''' 420 Enhance Your Calm (Twitter) |
390         ''' Not part of the HTTP standard, but returned by version 1 of the Twitter Search And Trends API when the client Is being rate limited.[17] 
391         ''' Other services may wish to implement the 429 Too Many Requests response code instead.
392         ''' </summary>
393
394         Public Const RFC_ENHANCE_YOUR_CALM As Long = 420
395         ''' <summary>
396         ''' 421 Misdirected Request (HTTP/2) |
397         ''' The request was directed at a server that Is Not able To produce a response (For example because a connection reuse).[18]
398         ''' </summary>
399
400         Public Const RFC_MISDIRECTED_REQUEST As Long = 421
401         ''' <summary>
402         ''' 422 Unprocessable Entity (WebDAV; RFC 4918) |
403         ''' The request was well-formed but was unable To be followed due To semantic errors.[4]
404         ''' </summary>
405
406         Public Const RFC_UNPROCESSABLE_ENTITY As Long = 422
407         ''' <summary>
408         ''' 423 Locked (WebDAV; RFC 4918) |
409         ''' The resource that Is being accessed Is locked.[4]
410         ''' </summary>
411
412         Public Const RFC_LOCKED As Long = 423
413         ''' <summary>
414         ''' 424 Failed Dependency (WebDAV; RFC 4918) |
415         ''' The request failed due To failure Of a previous request (e.g., a PROPPATCH).[4]
416         ''' </summary>
417
418         Public Const RFC_FAILED_DEPENDENCY As Long = 424
419         ''' <summary>
420         ''' 426 Upgrade Required |
421         ''' The client should switch To a different protocol such As TLS/1.0, given In the Upgrade header field.
422         ''' </summary>
423
424         Public Const RFC_UPGRADE_REQUIRED As Long = 426
425         ''' <summary>
426         ''' 428 Precondition Required (RFC 6585) |
427         ''' The origin server requires the request To be conditional. Intended To prevent "the 'lost update' problem, 
428         ''' where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party 
429         ''' has modified the state on the server, leading to a conflict."[19]
430         ''' </summary>
431
432         Public Const RFC_PRECONDITION_REQUIRED As Long = 428
433         ''' <summary>
434         ''' 429 Too Many Requests (RFC 6585) |
435         ''' The user has sent too many requests In a given amount Of time. Intended For use With rate limiting schemes.[19]
436         ''' </summary>
437
438         Public Const RFC_TOO_MANY_REQUEST As Long = 429
439         ''' <summary>
440         ''' 431 Request Header Fields Too Large (RFC 6585) |
441         ''' The server Is unwilling To process the request because either an individual header field, Or all the header fields collectively, are too large.[19]
442         ''' </summary>
443
444         Public Const RFC_REQUEST_HEADER_FIELDS_TOO_LARGE As Long = 431
445         ''' <summary>
446         ''' 440 Login Timeout (Microsoft) |
447         ''' A Microsoft extension. Indicates that your session has expired.[20]
448         ''' </summary>
449
450         Public Const RFC_LOGIN_TIMEOUT As Long = 440
451         ''' <summary>
452         ''' 444 No Response (Nginx) |
453         ''' Used in Nginx logs to indicate that the server has returned no information to the client And closed the connection (useful as a deterrent for malware).
454         ''' </summary>
455
456         Public Const RFC_NO_RESPONSE As Long = 444
457         ''' <summary>
458         ''' 449 Retry With (Microsoft) |
459         ''' A Microsoft extension. The request should be retried after performing the appropriate action.[21]
460         ''' </summary>
461
462         Public Const RFC_RETRY_WITH As Long = 449
463         ''' <summary>
464         ''' 450 Blocked by Windows Parental Controls (Microsoft) |
465         ''' A Microsoft extension. This Error Is given When Windows Parental Controls are turned On And are blocking access To the given webpage.[22]
466         ''' </summary>
467
468         Public Const RFC_BLOCKED As Long = 450
469         ''' <summary>
470         ''' 451 Unavailable For Legal Reasons (Internet draft) |
471         ''' Defined in the internet draft "A New HTTP Status Code for Legally-restricted Resources".[23] 
472         ''' Intended to be used when resource access Is denied for legal reasons, e.g. censorship Or government-mandated blocked access. 
473         ''' A reference to the 1953 dystopian novel Fahrenheit 451, where books are outlawed.[24]
474         ''' </summary>
475
476         Public Const RFC_LEGAL_UNAVAILABLE As Long = 451
477         ''' <summary>
478         ''' 451 Redirect (Microsoft) |
479         ''' Used in Exchange ActiveSync if there either Is a more efficient server to use Or the server cannot access the users' mailbox.[25]
480         ''' The client Is supposed To re-run the HTTP Autodiscovery protocol To find a better suited server.[26]
481         ''' </summary>
482
483         Public Const RFC_REDIRECT As Long = 451
484         ''' <summary>
485         ''' 494 Request Header Too Large (Nginx) |
486         ''' Nginx internal code similar To 431 but it was introduced earlier In version 0.9.4 (On January 21, 2011).[27][original research?]
487         ''' </summary>
488
489         Public Const RFC_REQUEST_HEADER_TOO_LARGE As Long = 494
490         ''' <summary>
491         ''' 495 Cert Error (Nginx) |
492         ''' Nginx internal code used When SSL client certificate Error occurred To distinguish it from 4XX In a log And an Error page redirection.
493         ''' (在SSL层解密的时候错误,则为证书错误)
494         ''' </summary>
495
496         Public Const RFC_CERT_ERROR As Long = 495
497
498         ''' <summary>
499         ''' 496 No Cert (Nginx) |
500         ''' Nginx internal code used When client didn't provide certificate to distinguish it from 4XX in a log and an error page redirection.
501         ''' </summary>
502
503         Public Const RFC_NO_CERT As Long = 496
504         ''' <summary>
505         ''' 497 HTTP to HTTPS (Nginx) |
506         ''' Nginx internal code used For the plain HTTP requests that are sent To HTTPS port To distinguish it from 4XX In a log And an Error page redirection.
507         ''' </summary>
508
509         Public Const RFC_HTTP_TO_HTTPS As Long = 497
510         ''' <summary>
511         ''' 498 Token expired/invalid (Esri) |
512         ''' Returned by ArcGIS For Server. A code Of 498 indicates an expired Or otherwise invalid token.[28]
513         ''' (错误的参数信息)
514         ''' </summary>
515
516         Public Const RFC_TOKEN_INVALID As Long = 498
517
518         ''' <summary>
519         ''' 499 Client Closed Request (Nginx) |
520         ''' Used in Nginx logs to indicate when the connection has been closed by client while the server Is still processing its request, making server unable to send a status code back.[29]
521         ''' </summary>
522
523         Public Const RFC_CLOSED_REQUEST As Long = 499
524         ''' <summary>
525         ''' 499 Token required (Esri) |
526         ''' Returned by ArcGIS For Server. A code Of 499 indicates that a token Is required (If no token was submitted).[28]
527         ''' </summary>
528
529         Public Const RFC_TOKEN_REQUIRED As Long = 499
530
531 #End Region
532
533 #Region "5xx Server Error"
534
535         ''' <summary>
536         ''' 500 Internal Server Error |
537         ''' A generic Error message, given When an unexpected condition was encountered And no more specific message Is suitable.
538         ''' </summary>
539
540         Public Const RFC_INTERNAL_SERVER_ERROR As Long = 500
541
542         ''' <summary>
543         ''' 501 Not Implemented |
544         ''' The server either does Not recognize the request method, Or it lacks the ability To fulfill the request. Usually this implies future availability (e.g., a New feature Of a web-service API).
545         ''' </summary>
546
547         Public Const RFC_NOT_IMPLEMENTED As Long = 501
548
549         ''' <summary>
550         ''' 502 Bad Gateway |
551         ''' The server was acting As a gateway Or proxy And received an invalid response from the upstream server.
552         ''' </summary>
553
554         Public Const RFC_BAD_GATEWAY As Long = 502
555         ''' <summary>
556         ''' 503 Service Unavailable |
557         ''' The server Is currently unavailable (because it Is overloaded Or down For maintenance). Generally, this Is a temporary state.
558         ''' </summary>
559
560         Public Const RFC_SERVICE_UNAVAILABLE As Long = 503
561
562         ''' <summary>
563         ''' 504 Gateway Timeout |
564         ''' The server was acting As a gateway Or proxy And did Not receive a timely response from the upstream server.
565         ''' </summary>
566
567         Public Const RFC_GATEWAY_TIMEOUT As Long = 504
568         ''' <summary>
569         ''' 505 HTTP Version Not Supported |
570         ''' The server does Not support the HTTP protocol version used In the request.
571         ''' </summary>
572
573         Public Const RFC_VERSION_NOT_SUPPORTED As Long = 505
574         ''' <summary>
575         ''' 506 Variant Also Negotiates (RFC 2295) |
576         ''' Transparent content negotiation For the request results In a circular reference.[30]
577         ''' </summary>
578
579         Public Const RFC_NEGOTIATES As Long = 506
580         ''' <summary>
581         ''' 507 Insufficient Storage (WebDAV; RFC 4918) |
582         ''' The server Is unable To store the representation needed To complete the request.[4]
583         ''' </summary>
584
585         Public Const RFC_INSUFFICIENT_STORAGE As Long = 507
586         ''' <summary>
587         ''' 508 Loop Detected (WebDAV; RFC 5842) |
588         ''' The server detected an infinite Loop While processing the request (sent In lieu Of 208 Already Reported).
589         ''' </summary>
590
591         Public Const RFC_LOOP_DETECTED As Long = 508
592         ''' <summary>
593         ''' 509 Bandwidth Limit Exceeded (Apache bw/limited extension)[31] |
594         ''' This status code Is Not specified In any RFCs. Its use Is unknown.
595         ''' </summary>
596
597         Public Const RFC_BANDWIDTH_LIMITED_EXCEEDED As Long = 509
598         ''' <summary>
599         ''' 510 Not Extended (RFC 2774) |
600         ''' Further extensions To the request are required For the server To fulfil it.[32]
601         ''' </summary>
602
603         Public Const RFC_NOT_EXTENDED As Long = 510
604         ''' <summary>
605         ''' 511 Network Authentication Required (RFC 6585) |
606         ''' The client needs To authenticate To gain network access. Intended For use by intercepting proxies used To control access To the network 
607         ''' (e.g., "captive portals" used To require agreement To Terms Of Service before granting full Internet access via a Wi-Fi hotspot).[19]
608         ''' </summary>
609
610         Public Const RFC_NETWORK_AUTH_REQUIRED As Long = 511
611         ''' <summary>
612         ''' 520 Unknown Error |
613         ''' This status code Is Not specified In any RFC And Is returned by certain services, For instance Microsoft Azure And CloudFlare servers: 
614         ''' "The 520 error is essentially a “catch-all” response for when the origin server returns something unexpected or something that is not 
615         ''' tolerated/interpreted (protocol violation or empty response)."[33]
616         ''' </summary>
617
618         Public Const RFC_UNKNOWN_ERROR As Long = 520
619
620         ''' <summary>
621         ''' 522 Origin Connection Time-out |
622         ''' This status code Is Not specified In any RFCs, but Is used by CloudFlare's reverse proxies to signal that a server connection timed out.
623         ''' </summary>
624
625         Public Const RFC_CONNECTION_TIMEOUT As Long = 522
626         ''' <summary>
627         ''' 598 Network read timeout error (Unknown) |
628         ''' This status code Is Not specified In any RFCs, but Is used by Microsoft HTTP proxies To signal a network read timeout behind the proxy To a client In front Of the proxy.[citation needed]
629         ''' </summary>
630
631         Public Const RFC_READ_TIMEOUT_ERROR As Long = 598
632         ''' <summary>
633         ''' 599 Network connect timeout error (Unknown) |
634         ''' This status code Is Not specified In any RFCs, but Is used by Microsoft HTTP proxies To signal a network connect timeout behind the proxy To a client In front Of the proxy.[citation needed]
635         ''' </summary>
636
637         Public Const RFC_CONNECT_TIMEOUT_ERROR As Long = 599
638 #End Region
639     End Module
640 End Namespace