blib/lib/HTTP/Promise/Status.pm untested

filter: Statementstmt 0.0% 0 / 100 Branchbran 0.0% 0 / 14 Conditioncond 0.0% 0 / 46 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 25 Podpod 0.0% 0 / 16 totaltotal 0.0% 0 / 201 CC 8 SCAR 16.2
CC
8
Cov
0%
convert_short_lang_to_long
12.0
status_message
12.0
_min_max
12.0
CRAP 5.1
1 ##----------------------------------------------------------------------------
2 ## Asynchronous HTTP Request and Promise - ~/lib/HTTP/Promise/Status.pm
3 ## Version v0.1.0
4 ## Copyright(c) 2022 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2022/04/05
7 ## Modified 2022/04/05
8 ## All rights reserved
9 ##
10 ## This program is free software; you can redistribute it and/or modify it
11 ## under the same terms as Perl itself.
12 ##----------------------------------------------------------------------------
13 package HTTP::Promise::Status;
14 BEGIN
15 {
16 use strict;
17 use warnings;
18 warnings::register_categories( 'HTTP::Promise' );
19 use parent qw( Module::Generic );
20 use vars qw( $VERSION @EXPORT @EXPORT_OK %EXPORT_TAGS
21 $CODES_LOCALE $CODES_LANG_SHORT );
22 our $VERSION = 'v0.1.0';
23 use constant
24 {
25 HTTP_CONTINUE => 100,
26 HTTP_SWITCHING_PROTOCOLS => 101,
27 HTTP_PROCESSING => 102,
28 HTTP_EARLY_HINTS => 103,
29 HTTP_OK => 200,
30 HTTP_CREATED => 201,
31 HTTP_ACCEPTED => 202,
32 HTTP_NON_AUTHORITATIVE => 203,
33 HTTP_NO_CONTENT => 204,
34 HTTP_RESET_CONTENT => 205,
35 HTTP_PARTIAL_CONTENT => 206,
36 HTTP_MULTI_STATUS => 207,
37 HTTP_ALREADY_REPORTED => 208,
38 HTTP_IM_USED => 226,
39 HTTP_MULTIPLE_CHOICES => 300,
40 HTTP_MOVED_PERMANENTLY => 301,
41 HTTP_MOVED_TEMPORARILY => 302,
42 HTTP_SEE_OTHER => 303,
43 HTTP_NOT_MODIFIED => 304,
44 HTTP_USE_PROXY => 305,
45 HTTP_TEMPORARY_REDIRECT => 307,
46 HTTP_PERMANENT_REDIRECT => 308,
47 HTTP_BAD_REQUEST => 400,
48 HTTP_UNAUTHORIZED => 401,
49 HTTP_PAYMENT_REQUIRED => 402,
50 HTTP_FORBIDDEN => 403,
51 HTTP_NOT_FOUND => 404,
52 HTTP_METHOD_NOT_ALLOWED => 405,
53 HTTP_NOT_ACCEPTABLE => 406,
54 HTTP_PROXY_AUTHENTICATION_REQUIRED => 407,
55 HTTP_REQUEST_TIME_OUT => 408,
56 HTTP_CONFLICT => 409,
57 HTTP_GONE => 410,
58 HTTP_LENGTH_REQUIRED => 411,
59 HTTP_PRECONDITION_FAILED => 412,
60 HTTP_REQUEST_ENTITY_TOO_LARGE => 413,
61 # Compatibility with HTTP::Status
62 HTTP_PAYLOAD_TOO_LARGE => 413,
63 HTTP_REQUEST_URI_TOO_LARGE => 414,
64 HTTP_URI_TOO_LONG => 414,
65 HTTP_UNSUPPORTED_MEDIA_TYPE => 415,
66 HTTP_RANGE_NOT_SATISFIABLE => 416,
67 # Compatibility with HTTP::Status
68 HTTP_REQUEST_RANGE_NOT_SATISFIABLE => 416,
69 HTTP_EXPECTATION_FAILED => 417,
70 HTTP_I_AM_A_TEA_POT => 418,
71 # Compatibility with HTTP::Status
72 HTTP_I_AM_A_TEAPOT => 418,
73 HTTP_MISDIRECTED_REQUEST => 421,
74 HTTP_UNPROCESSABLE_ENTITY => 422,
75 HTTP_LOCKED => 423,
76 HTTP_FAILED_DEPENDENCY => 424,
77 HTTP_TOO_EARLY => 425,
78 # Compatibility with HTTP::Status
79 HTTP_NO_CODE => 425,
80 # Compatibility with HTTP::Status
81 HTTP_UNORDERED_COLLECTION => 425,
82 HTTP_UPGRADE_REQUIRED => 426,
83 HTTP_PRECONDITION_REQUIRED => 428,
84 HTTP_TOO_MANY_REQUESTS => 429,
85 HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE => 431,
86 HTTP_CONNECTION_CLOSED_WITHOUT_RESPONSE => 444,
87 HTTP_UNAVAILABLE_FOR_LEGAL_REASONS => 451,
88 HTTP_CLIENT_CLOSED_REQUEST => 499,
89 HTTP_INTERNAL_SERVER_ERROR => 500,
90 HTTP_NOT_IMPLEMENTED => 501,
91 HTTP_BAD_GATEWAY => 502,
92 HTTP_SERVICE_UNAVAILABLE => 503,
93 HTTP_GATEWAY_TIME_OUT => 504,
94 HTTP_VERSION_NOT_SUPPORTED => 505,
95 HTTP_VARIANT_ALSO_VARIES => 506,
96 HTTP_INSUFFICIENT_STORAGE => 507,
97 HTTP_LOOP_DETECTED => 508,
98 HTTP_BANDWIDTH_LIMIT_EXCEEDED => 509,
99 HTTP_NOT_EXTENDED => 510,
100 HTTP_NETWORK_AUTHENTICATION_REQUIRED => 511,
101 HTTP_NETWORK_CONNECT_TIMEOUT_ERROR => 599,
102 };
103 our @EXPORT_OK = qw(
104 HTTP_ACCEPTED HTTP_ALREADY_REPORTED HTTP_BAD_GATEWAY HTTP_BAD_REQUEST
105 HTTP_BANDWIDTH_LIMIT_EXCEEDED HTTP_CLIENT_CLOSED_REQUEST HTTP_CONFLICT
106 HTTP_CONNECTION_CLOSED_WITHOUT_RESPONSE HTTP_CONTINUE HTTP_CREATED
107 HTTP_EARLY_HINTS HTTP_EXPECTATION_FAILED HTTP_FAILED_DEPENDENCY
108 HTTP_FORBIDDEN HTTP_GATEWAY_TIME_OUT HTTP_GONE HTTP_IM_USED
109 HTTP_INSUFFICIENT_STORAGE HTTP_INTERNAL_SERVER_ERROR
110 HTTP_I_AM_A_TEAPOT HTTP_I_AM_A_TEA_POT HTTP_LENGTH_REQUIRED
111 HTTP_LOCKED HTTP_LOOP_DETECTED HTTP_METHOD_NOT_ALLOWED
112 HTTP_MISDIRECTED_REQUEST HTTP_MOVED_PERMANENTLY HTTP_MOVED_TEMPORARILY
113 HTTP_MULTIPLE_CHOICES HTTP_MULTI_STATUS
114 HTTP_NETWORK_AUTHENTICATION_REQUIRED
115 HTTP_NETWORK_CONNECT_TIMEOUT_ERROR HTTP_NON_AUTHORITATIVE
116 HTTP_NOT_ACCEPTABLE HTTP_NOT_EXTENDED HTTP_NOT_FOUND
117 HTTP_NOT_IMPLEMENTED HTTP_NOT_MODIFIED HTTP_NO_CODE HTTP_NO_CONTENT
118 HTTP_OK HTTP_PARTIAL_CONTENT HTTP_PAYLOAD_TOO_LARGE
119 HTTP_PAYMENT_REQUIRED HTTP_PERMANENT_REDIRECT HTTP_PRECONDITION_FAILED
120 HTTP_PRECONDITION_REQUIRED HTTP_PROCESSING
121 HTTP_PROXY_AUTHENTICATION_REQUIRED HTTP_RANGE_NOT_SATISFIABLE
122 HTTP_REQUEST_ENTITY_TOO_LARGE HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE
123 HTTP_REQUEST_RANGE_NOT_SATISFIABLE HTTP_REQUEST_TIME_OUT
124 HTTP_REQUEST_URI_TOO_LARGE HTTP_RESET_CONTENT HTTP_SEE_OTHER
125 HTTP_SERVICE_UNAVAILABLE HTTP_SWITCHING_PROTOCOLS
126 HTTP_TEMPORARY_REDIRECT HTTP_TOO_EARLY HTTP_TOO_MANY_REQUESTS
127 HTTP_UNAUTHORIZED HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
128 HTTP_UNORDERED_COLLECTION HTTP_UNPROCESSABLE_ENTITY
129 HTTP_UNSUPPORTED_MEDIA_TYPE HTTP_UPGRADE_REQUIRED HTTP_URI_TOO_LONG
130 HTTP_USE_PROXY HTTP_VARIANT_ALSO_VARIES HTTP_VERSION_NOT_SUPPORTED
131 );
132 our %EXPORT_TAGS = (
133 all => [@EXPORT_OK],
134 common => [qw( HTTP_NETWORK_AUTHENTICATION_REQUIRED HTTP_FORBIDDEN HTTP_NOT_FOUND HTTP_OK HTTP_TEMPORARY_REDIRECT HTTP_INTERNAL_SERVER_ERROR )],
135 );
136 };
137  
138 sub import
139 {
140 my $class = shift( @_ );
141 local $Exporter::ExportLevel = 1;
142 Exporter::import( $class, @_ );
143 }
144  
145 {
146 use utf8;
147 our $CODES_LOCALE =
148 {
149 cs_CZ => {
150 100 => "Pokračovat",
151 101 => "Přepínání protokolů",
152 102 => "Zpracovává se",
153 103 => "Předběžné pokyny",
154 200 => "OK",
155 201 => "Vytvořeno",
156 202 => "Přijato",
157 203 => "Neautoritativní informace",
158 204 => "Bez obsahu",
159 205 => "Obnovit obsah",
160 206 => "Částečný obsah",
161 207 => "Více stavů",
162 208 => "Již nahlášeno",
163 226 => "IM použito",
164 300 => "Více možností",
165 301 => "Trvale přesunuto!",
166 302 => "Dočasně přesunuto!",
167 303 => "Viz jiné",
168 304 => "Nezměněno",
169 305 => "Použít proxy",
170 307 => "Dočasné přesměrování!",
171 308 => "Trvalé přesměrování!",
172 400 => "Chybný požadavek!",
173 401 => "Požadováno ověření!",
174 402 => "Platba vyžadována!",
175 403 => "Přístup odmítnut!",
176 404 => "Objekt nenalezen!",
177 405 => "Metoda nepovolena!",
178 406 => "Nepřijatelné!",
179 407 => "Požadováno ověření proxy!",
180 408 => "Vypršel časový limit požadavku!",
181 409 => "Konflikt!",
182 410 => "Zdroj již není dále dostupný!",
183 411 => "Chybná hlavička Content-Length!",
184 412 => "Předběžná podmínka nesplněna!",
185 413 => "Požadovaná entita je příliš velká!",
186 414 => "Požadované URI je příliš dlouhé!",
187 415 => "Nepodporovaný typ média!",
188 416 => "Požadovanému rozsahu nelze vyhovět!",
189 417 => "Očekávání nesplněno!",
190 418 => "Jsem čajník",
191 421 => "Chybně směrovaný požadavek",
192 422 => "Nezpracovatelná entita!",
193 423 => "Zámek zdroje!",
194 424 => "Selhávající závislost!",
195 425 => "Příliš brzy!",
196 426 => "Vyžadována aktualizace!",
197 428 => "Vyžadována předpodmínka",
198 429 => "Příliš mnoho požadavků!",
199 431 => "Hlavičky požadavku příliš velké!",
200 444 => "Připojení ukončeno bez odpovědi",
201 451 => "Nedostupné z právních důvodů!",
202 499 => "Požadavek ukončen klientem",
203 500 => "Chyba serveru!",
204 501 => "Nelze zpracovat požadavek!",
205 502 => "Chybná brána!",
206 503 => "Služba není dostupná!",
207 504 => "Vypršel čas brány!",
208 505 => "Nepodporovaná verze HTTP",
209 506 => "Varianta rovněž variuje!",
210 507 => "Nedostatek úložného prostoru!",
211 508 => "Zjištěna smyčka!",
212 509 => "Překročeno omezení šířky pásma",
213 510 => "Nerozšířeno",
214 511 => "Vyžadováno síťové ověření",
215 599 => "Chyba časového limitu síťového připojení",
216 },
217 # Ref: <https://developer.mozilla.org/de/docs/Web/HTTP/Status/100>
218 # <https://www.dotcom-monitor.com/wiki/de/knowledge-base/http-status-codes/>
219 de_DE => {
220 100 => "Weiter",
221 101 => "Protokolle wechseln",
222 102 => "Verarbeitung",
223 103 => "Frühe Hinweise",
224 200 => "OK",
225 201 => "Erstellt",
226 202 => "Akzeptiert",
227 203 => "Nicht autorisierende Informationen",
228 204 => "Kein Inhalt",
229 205 => "Inhalt zurücksetzen",
230 206 => "Teilinhalt",
231 207 => "Multi-Status",
232 208 => "Bereits gemeldet",
233 226 => "IM verwendet",
234 300 => "Mehrfachauswahlmöglichkeiten",
235 301 => "Dauerhaft verschoben!",
236 302 => "Vorübergehend verschoben!",
237 303 => "Andere sehen",
238 304 => "Nicht geändert",
239 305 => "Proxy verwenden",
240 307 => "Vorübergehende Umleitung!",
241 308 => "Dauerhafte Umleitung!",
242 400 => "Fehlerhafte Anfrage!",
243 401 => "Authentifizierung erforderlich!",
244 402 => "Zahlung erforderlich!",
245 403 => "Zugriff verweigert!",
246 404 => "Objekt nicht gefunden!",
247 405 => "Methode nicht erlaubt!",
248 406 => "Nicht akzeptabel!",
249 407 => "Proxy-Authentifizierung erforderlich!",
250 408 => "Zeitlimit überschritten!",
251 409 => "Konflikt!",
252 410 => "Objekt nicht mehr verfügbar!",
253 411 => "Content-Length-Angabe fehlerhaft!",
254 412 => "Vorbedingung nicht erfüllt!",
255 413 => "Übergebene Daten zu groß!",
256 414 => "Übergebener URI zu lang!",
257 415 => "Nicht unterstützter Medientyp!",
258 416 => "Bereich nicht erfüllbar!",
259 417 => "Erwartung fehlgeschlagen!",
260 418 => "Ich bin eine Teekanne",
261 421 => "Fehlgeleitete Anfrage",
262 422 => "Unverarbeitbare Entität!",
263 423 => "Ressource gesperrt!",
264 424 => "Fehlende Abhängigkeit!",
265 425 => "Zu früh!",
266 426 => "Upgrade erforderlich!",
267 428 => "Vorbedingung erforderlich",
268 429 => "Zu viele Anfragen!",
269 431 => "Anfrage-Header zu groß!",
270 444 => "Verbindung ohne Antwort geschlossen",
271 451 => "Aus rechtlichen Gründen nicht verfügbar!",
272 499 => "Client die Verbindung schließt",
273 500 => "Serverfehler!",
274 501 => "Anfrage nicht ausführbar!",
275 502 => "Fehlerhaftes Gateway!",
276 503 => "Dienst nicht verfügbar!",
277 504 => "Gateway-Zeitüberschreitung!",
278 505 => "HTTP-Version nicht unterstützt",
279 506 => "Variante variiert ebenfalls!",
280 507 => "Unzureichender Speicherplatz!",
281 508 => "Endlosschleife erkannt!",
282 509 => "Bandbreitenlimit überschritten",
283 510 => "Nicht erweitert",
284 511 => "Netzwerkauthentifizierung erforderlich",
285 599 => "Timeout-Fehler bei Netzwerkverbindung",
286 },
287 en_GB => {
288 100 => "Continue",
289 101 => "Switching Protocols",
290 102 => "Processing",
291 103 => "Early Hints",
292 200 => "OK",
293 201 => "Created",
294 202 => "Accepted",
295 203 => "Non-authoritative Information",
296 204 => "No Content",
297 205 => "Reset Content",
298 206 => "Partial Content",
299 207 => "Multi-Status",
300 208 => "Already Reported",
301 226 => "IM Used",
302 300 => "Multiple Choices",
303 301 => "Moved permanently!",
304 302 => "Found (temporary redirect)!",
305 303 => "See Other",
306 304 => "Not Modified",
307 305 => "Use Proxy",
308 307 => "Temporary redirect!",
309 308 => "Permanent redirect!",
310 400 => "Bad request!",
311 401 => "Authentication required!",
312 402 => "Payment required!",
313 403 => "Access forbidden!",
314 404 => "Object not found!",
315 405 => "Method not allowed!",
316 406 => "Not acceptable!",
317 407 => "Proxy authentication required!",
318 408 => "Request time-out!",
319 409 => "Conflict!",
320 410 => "Resource is no longer available!",
321 411 => "Bad Content-Length!",
322 412 => "Precondition failed!",
323 413 => "Request entity too large!",
324 414 => "Submitted URI too long!",
325 415 => "Unsupported media type!",
326 416 => "Range not satisfiable!",
327 417 => "Expectation failed!",
328 # Humour: April's fool
329 # <https://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol>
330 418 => "I'm a teapot",
331 421 => "Misdirected Request",
332 422 => "Unprocessable entity!",
333 423 => "Resource locked!",
334 424 => "Failed dependency!",
335 425 => "Too early!",
336 426 => "Upgrade Required!",
337 428 => "Precondition Required",
338 429 => "Too many requests!",
339 431 => "Request Headers Too Large!",
340 444 => "Connection Closed Without Response",
341 451 => "Unavailable for legal reasons!",
342 499 => "Client Closed Request",
343 500 => "Server error!",
344 501 => "Cannot process request!",
345 502 => "Bad Gateway!",
346 503 => "Service unavailable!",
347 504 => "Gateway timeout!",
348 505 => "HTTP Version Not Supported",
349 506 => "Variant also varies!",
350 507 => "Insufficient storage!",
351 508 => "Loop detected!",
352 509 => "Bandwidth Limit Exceeded",
353 510 => "Not Extended",
354 511 => "Network Authentication Required",
355 599 => "Network Connect Timeout Error",
356 },
357 es_ES => {
358 100 => "Continuar",
359 101 => "Cambio de protocolos",
360 102 => "Procesando",
361 103 => "Pistas tempranas",
362 200 => "OK",
363 201 => "Creado",
364 202 => "Aceptado",
365 203 => "Información no autoritativa",
366 204 => "Sin contenido",
367 205 => "Restablecer contenido",
368 206 => "Contenido parcial",
369 207 => "Multi-estado",
370 208 => "Ya informado",
371 226 => "IM usado",
372 300 => "Múltiples opciones",
373 301 => "¡Movido permanentemente!",
374 302 => "¡Encontrado (redirección temporal)!",
375 303 => "Ver otros",
376 304 => "No modificado",
377 305 => "Usar proxy",
378 307 => "¡Redirección temporal!",
379 308 => "¡Redirección permanente!",
380 400 => "¡Petición errónea!",
381 401 => "¡Autenticación requerida!",
382 402 => "¡Pago requerido!",
383 403 => "¡Acceso prohibido!",
384 404 => "¡Objeto no localizado!",
385 405 => "¡Método no permitido!",
386 406 => "¡No aceptable!",
387 407 => "¡Se requiere autenticación de proxy!",
388 408 => "¡Tiempo de espera excedido!",
389 409 => "¡Conflicto!",
390 410 => "¡El recurso ya no está disponible!",
391 411 => "¡Error en la longitud del contenido!",
392 412 => "¡Fallo de precondición!",
393 413 => "¡La entidad solicitada es demasiado grande!",
394 414 => "¡El URI enviado es demasiado largo!",
395 415 => "¡Tipo de medio no soportado!",
396 416 => "Rango no satisfacible!",
397 417 => "Expectativa no satisfecha!",
398 418 => "Soy una tetera",
399 421 => "Solicitud mal dirigida",
400 422 => "¡Entidad no procesable!",
401 423 => "Recurso bloqueado!",
402 424 => "¡Dependencia fallida!",
403 425 => "¡Demasiado pronto!",
404 426 => "¡Actualización requerida!",
405 428 => "Se requiere condición previa",
406 429 => "¡Demasiadas solicitudes!",
407 431 => "¡Encabezados de solicitud demasiado grandes!",
408 444 => "Conexión cerrada sin respuesta",
409 451 => "¡No disponible por razones legales!",
410 499 => "Solicitud cerrada por el cliente",
411 500 => "¡Error del servidor!",
412 501 => "¡No se puede procesar la petición!",
413 502 => "¡Puerta de enlace errónea!",
414 503 => "¡Servicio no disponible!",
415 504 => "¡Tiempo de espera de la pasarela agotado!",
416 505 => "Versión HTTP no soportada",
417 506 => "La variante también varía",
418 507 => "¡Almacenamiento insuficiente!",
419 508 => "¡Bucle detectado!",
420 509 => "Límite de ancho de banda excedido",
421 510 => "No extendido",
422 511 => "Autenticación de red requerida",
423 599 => "Error de tiempo de espera de conexión de red",
424 },
425 fr_FR => {
426 100 => "Continuer",
427 101 => "Changement de protocole",
428 102 => "En traitement",
429 103 => "Premiers indices",
430 200 => "OK",
431 201 => "Créé",
432 202 => "Accepté",
433 203 => "Information non certifiée",
434 204 => "Pas de contenu",
435 205 => "Contenu réinitialisé",
436 206 => "Contenu partiel",
437 207 => "Multi-Status",
438 208 => "Déjà rapporté",
439 226 => "IM utilisé",
440 300 => "Choix multiples",
441 301 => "Déplacé définitivement !",
442 302 => "Trouvé (redirection temporaire) !",
443 303 => "Voir ailleurs",
444 304 => "Non modifié",
445 305 => "Utiliser le proxy",
446 307 => "Redirection temporaire !",
447 308 => "Redirection permanente !",
448 400 => "Requête incorrecte !",
449 401 => "Authentification requise !",
450 402 => "Paiement requis !",
451 403 => "Accès interdit!",
452 404 => "Objet non trouvé!",
453 405 => "Méthode interdite!",
454 406 => "Non acceptable !",
455 407 => "Authentification proxy requise !",
456 408 => "Délai d’attente de la requête dépassé !",
457 409 => "Conflit !",
458 410 => "Cette ressource n'existe plus!",
459 411 => "Longueur du contenu invalide!",
460 412 => "Échec de la précondition !",
461 413 => "Corps de requête trop volumineux !",
462 414 => "L’URI transmis est trop long !",
463 415 => "Type de média non pris en charge !",
464 416 => "Plage de requête non satisfaisable !",
465 417 => "Attente non satisfaite !",
466 # Humour; poisson d'avril
467 # <https://fr.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol>
468 418 => "Je suis une théière",
469 421 => "Requête mal dirigée",
470 422 => "Entité non traitable !",
471 423 => "Ressource verrouillée !",
472 424 => "Dépendance défaillante !",
473 425 => "Trop tôt !",
474 426 => "Mise à niveau requise !",
475 428 => "Précondition requise",
476 429 => "Trop de requêtes !",
477 431 => "En-têtes de requête trop grands !",
478 444 => "Connexion clôturée sans réponse",
479 451 => "Indisponible pour des raisons juridiques !",
480 499 => "Le client a terminé la requête",
481 500 => "Erreur du serveur!",
482 501 => "La requête ne peut pas être traitée!",
483 502 => "Mauvaise passerelle !",
484 503 => "Service inaccessible!",
485 504 => "Délai d’attente de la passerelle dépassé !",
486 505 => "Version HTTP non supportée",
487 506 => "La variante varie également !",
488 507 => "Espace de stockage insuffisant !",
489 508 => "Boucle détectée !",
490 509 => "Limite de bande passante dépassée",
491 510 => "Pas étendu",
492 511 => "Authentification réseau requise",
493 599 => "Délai d’attente de la connexion réseau dépassé",
494 },
495 ga_IE => {
496 100 => "Lean ar aghaidh",
497 101 => "Prótacail á n-athrú",
498 102 => "Á phróiseáil",
499 103 => "Leideanna luatha",
500 200 => "OK",
501 201 => "Cruthaithe",
502 202 => "Glactha",
503 203 => "Eolas neamhúdarásach",
504 204 => "Gan ábhar",
505 205 => "Ábhar athshocraithe",
506 206 => "Ábhar páirteach",
507 207 => "Il-stádas",
508 208 => "Tuairiscithe cheana",
509 226 => "IM in úsáid",
510 300 => "Ilroghanna",
511 301 => "Bogtha go buan!",
512 302 => "Aimsíodh (atreorú sealadach)!",
513 303 => "Féach eile",
514 304 => "Gan athrú",
515 305 => "Úsáid seachfhreastalaí",
516 307 => "Atreorú sealadach!",
517 308 => "Atreorú buan!",
518 400 => "Iarratas mícheart!",
519 401 => "Is gá fíordheimhniú!",
520 402 => "Íocaíocht de dhíth!",
521 403 => "Rochtain neamhcheadaithe!",
522 404 => "Aidhm ar iarraidh!",
523 405 => "Modh neamhcheadaithe!",
524 406 => "Neamhghlactha!",
525 407 => "Fíordheimhniú seachfhreastalaí de dhíth!",
526 408 => "Iarratas thar am!",
527 409 => "Coinbhleacht!",
528 410 => "Acmhainn imithe!",
529 411 => "Content-Length mícheart!",
530 412 => "Theip ar réamhchoinníoll!",
531 413 => "Eintiteas an iarratais ró-mhór!",
532 414 => "URI ró-fhada cuirthe isteach!",
533 415 => "Cineál meán gan tacaíocht!",
534 416 => "Raon nach féidir a shásamh!",
535 417 => "Theip an ionchas!",
536 418 => "Is taephota mé",
537 421 => "Iarratas mí-treoraithe",
538 422 => "Aonad do-dhéanta a phróiseáil!",
539 423 => "Acmhainn faoi ghlas!",
540 424 => "Spleáchas teipthe!",
541 425 => "Ró-luath!",
542 426 => "Uasghrádú riachtanach!",
543 428 => "Réamhchoinníoll riachtanach",
544 429 => "An iomarca iarrataí!",
545 431 => "Ceannteidil iarratais ró-mhór!",
546 444 => "Ceangal dúnta gan freagra",
547 451 => "Níl ar fáil ar chúiseanna dlí!",
548 499 => "Iarratas dúnta ag an gcliant",
549 500 => "Earráid fhreastalaí!",
550 501 => "Ní féidir an t-iarratas a phróiseáil!",
551 502 => "Geata mícheart!",
552 503 => "Seirbhís doúsáidte!",
553 504 => "Teorainn ama geata imithe thar fóir!",
554 505 => "Leagan HTTP gan tacaíocht",
555 506 => "Athróg ag athrú freisin!",
556 507 => "Stóráil neamhleor!",
557 508 => "Lúb aithnithe!",
558 509 => "Teorainn bandaleithid sáraithe",
559 510 => "Gan leathnú",
560 511 => "Fíordheimhniú líonra riachtanach",
561 599 => "Earráid ama-theorann ceangail líonra",
562 },
563 it_IT => {
564 100 => "Continua",
565 101 => "Cambio di protocollo",
566 102 => "Elaborazione in corso",
567 103 => "Suggerimenti iniziali",
568 200 => "OK",
569 201 => "Creato",
570 202 => "Accettato",
571 203 => "Informazioni non autorevoli",
572 204 => "Nessun contenuto",
573 205 => "Reimposta contenuto",
574 206 => "Contenuto parziale",
575 207 => "Multi-stato",
576 208 => "Già segnalato",
577 226 => "IM utilizzato",
578 300 => "Scelte multiple",
579 301 => "Spostato definitivamente!",
580 302 => "Trovato (reindirizzamento temporaneo)!",
581 303 => "Vedi altro",
582 304 => "Non modificato",
583 305 => "Usa proxy",
584 307 => "Reindirizzamento temporaneo!",
585 308 => "Reindirizzamento permanente!",
586 400 => "Richiesta non valida!",
587 401 => "Autenticazione richiesta!",
588 402 => "È richiesto il pagamento!",
589 403 => "Accesso negato!",
590 404 => "Oggetto non trovato!",
591 405 => "Metodo non consentito!",
592 406 => "Non accettabile!",
593 407 => "Autenticazione proxy richiesta!",
594 408 => "Time-out della richiesta!",
595 409 => "Conflitto!",
596 410 => "La risorsa non è più disponibile!",
597 411 => "Campo Content-Length non valido!",
598 412 => "Precondizione non soddisfatta!",
599 413 => "Entità della richiesta troppo grande!",
600 414 => "URI troppo lungo!",
601 415 => "Tipo di media non supportato!",
602 416 => "Intervallo non soddisfacibile!",
603 417 => "Expectation fallita!",
604 418 => "Sono una teiera",
605 421 => "Richiesta mal indirizzata",
606 422 => "Entità non elaborabile!",
607 423 => "Risorsa bloccata!",
608 424 => "Dipendenza non soddisfatta!",
609 425 => "Troppo presto!",
610 426 => "Aggiornamento richiesto!",
611 428 => "Precondizione richiesta",
612 429 => "Troppe richieste!",
613 431 => "Intestazioni di richiesta troppo grandi!",
614 444 => "Connessione chiusa senza risposta",
615 451 => "Non disponibile per motivi legali!",
616 499 => "Richiesta chiusa dal client",
617 500 => "Errore del server!",
618 501 => "La richiesta non può essere soddisfatta!",
619 502 => "Gateway errato!",
620 503 => "Servizio non disponibile!",
621 504 => "Timeout del gateway!",
622 505 => "Versione HTTP non supportata",
623 506 => "La variante varia anch’essa!",
624 507 => "Spazio di archiviazione insufficiente!",
625 508 => "Rilevato loop!",
626 509 => "Limite di banda superato",
627 510 => "Non esteso",
628 511 => "Autenticazione di rete richiesta",
629 599 => "Errore di timeout della connessione di rete",
630 },
631 ja_JP => {
632 100 => "継続",
633 101 => "プロトコル切替",
634 102 => "処理中",
635 103 => "早期のヒント",
636 200 => "成功",
637 201 => "作成完了",
638 202 => "受理",
639 203 => "信頼できない情報",
640 204 => "内容なし",
641 205 => "内容をリセット",
642 206 => "部分的内容",
643 207 => "複数のステータス",
644 208 => "既に報告",
645 226 => "IM使用",
646 300 => "複数の選択",
647 301 => "恒久的に移動しました!",
648 302 => "一時的に移動しました!",
649 303 => "他を参照せよ",
650 304 => "未更新",
651 305 => "プロキシを使用せよ",
652 307 => "一時的なリダイレクト!",
653 308 => "恒久的なリダイレクト!",
654 400 => "不正なリクエスト!",
655 401 => "認証が必要です!",
656 402 => "お支払いが必要です!",
657 403 => "アクセス拒否!",
658 404 => "未検出!",
659 405 => "許可されていないメソッド!",
660 406 => "受理できません!",
661 407 => "プロキシ認証が必要です!",
662 408 => "リクエストタイムアウト!",
663 409 => "競合が発生しました!",
664 410 => "リソースはもう使えない!",
665 411 => "不正なContent-Length!",
666 412 => "前提条件を満たしていません!",
667 413 => "ペイロードが大きすぎる!",
668 414 => "URI が長すぎます!",
669 415 => "サポートされていないメディアタイプ!",
670 416 => "要求範囲は満たせません!",
671 417 => "Expect ヘッダーを満たせません!",
672 418 => "私はティーポット",
673 421 => "誤った宛先へのリクエスト",
674 422 => "処理できないエンティティ!",
675 423 => "リソースがロックされています!",
676 424 => "依存関係の失敗!",
677 425 => "時期尚早!",
678 426 => "アップグレードが必要!",
679 428 => "前提条件が必要です",
680 429 => "リクエストが多すぎます!",
681 431 => "リクエストヘッダが大きすぎる!",
682 444 => "応答なしで接続が閉じられました",
683 451 => "法的理由により利用できません!",
684 499 => "クライアントによるリクエストの終了",
685 500 => "サーバ内部エラー!",
686 501 => "リクエストを処理できない!",
687 502 => "不正なゲートウェイ!",
688 503 => "サービス利用不可!",
689 504 => "ゲートウェイタイムアウト!",
690 505 => "サポートしていないHTTPバージョン",
691 506 => "バリアントも変動します!",
692 507 => "ストレージ不足!",
693 508 => "ループを検出しました!",
694 509 => "帯域幅制限超過",
695 510 => "拡張できない",
696 511 => "ネットワーク認証が必要",
697 599 => "ネットワーク接続タイムアウトエラー",
698 },
699 # Ref: <https://developer.mozilla.org/ko/docs/Web/HTTP/Status>
700 # <https://ko.wikipedia.org/wiki/HTTP_%EC%83%81%ED%83%9C_%EC%BD%94%EB%93%9C>
701 # <http://wiki.hash.kr/index.php/HTTP>
702 ko_KR => {
703 100 => "계속",
704 101 => "스위칭 프로토콜",
705 102 => "처리 중",
706 103 => "초기 힌트",
707 200 => "확인",
708 201 => "생성됨",
709 202 => "수락",
710 203 => "신뢰할 수 없는 정보",
711 204 => "내용 없음",
712 205 => "콘텐츠 재설정",
713 206 => "부분적인 내용",
714 207 => "다중 상태",
715 208 => "이미 보고됨",
716 226 => "IM 사용",
717 300 => "다중 선택",
718 301 => "영구적으로 이동되었습니다!",
719 302 => "임시로 이동되었습니다!",
720 303 => "다른 참조",
721 304 => "수정되지 않음",
722 305 => "프록시 사용",
723 307 => "임시 리디렉션!",
724 308 => "영구 리디렉션!",
725 400 => "잘못된 요청!",
726 401 => "인증 필요!",
727 402 => "결제가 필요합니다!",
728 403 => "접근이 거부됨!",
729 404 => "객체 없음!",
730 405 => "허용되지 않는 요청 방식!",
731 406 => "허용되지 않음!",
732 407 => "프록시 인증이 필요합니다!",
733 408 => "요청 시간 초과!",
734 409 => "충돌!",
735 410 => "요청한 리소스는 더 이상 제공되지 않습니다!",
736 411 => "잘못된 Content-Length!",
737 412 => "사전 조건이 충족되지 않았습니다!",
738 413 => "요청 본문이 너무 큽니다!",
739 414 => "제출한 URI가 너무 깁니다!",
740 415 => "지원되지 않는 미디어 유형!",
741 416 => "범위를 만족시킬 수 없습니다!",
742 417 => "기대(Expect) 조건을 충족하지 못했습니다!",
743 418 => "나는 주전자입니다",
744 421 => "잘못된 요청",
745 422 => "처리할 수 없는 엔터티!",
746 423 => "리소스가 잠겨 있습니다!",
747 424 => "종속성이 실패했습니다!",
748 425 => "너무 이른 요청!",
749 426 => "업그레이드 필요!",
750 428 => "전제조건 필요",
751 429 => "요청이 너무 많습니다!",
752 431 => "요청 헤더가 너무 큼!",
753 444 => "응답없이 연결이 닫힘",
754 451 => "법적 사유로 이용할 수 없습니다!",
755 499 => "클라이언트가 요청을 닫음",
756 500 => "서버 오류!",
757 501 => "요청 처리 실패!",
758 502 => "잘못된 게이트웨이!",
759 503 => "서비스를 사용할 수 없음!",
760 504 => "게이트웨이 시간 초과!",
761 505 => "HTTP 버전이 지원되지 않음",
762 506 => "변형도 변동합니다!",
763 507 => "저장 공간 부족!",
764 508 => "루프 감지됨!",
765 509 => "대역폭 제한 초과",
766 510 => "확장되지 않음",
767 511 => "네트워크 인증 필요",
768 599 => "네트워크 연결 시간초과 오류",
769 },
770 nb_NO => {
771 100 => "Fortsett",
772 101 => "Bytter protokoller",
773 102 => "Behandler",
774 103 => "Tidlige hint",
775 200 => "OK",
776 201 => "Opprettet",
777 202 => "Akseptert",
778 203 => "Ikke-autoritativ informasjon",
779 204 => "Intet innhold",
780 205 => "Tilbakestill innhold",
781 206 => "Delvis innhold",
782 207 => "Multi-status",
783 208 => "Allerede rapportert",
784 226 => "IM brukt",
785 300 => "Flere valg",
786 301 => "Flyttet permanent!",
787 302 => "Funnet (midlertidig omdirigering)!",
788 303 => "Se annet",
789 304 => "Ikke endret",
790 305 => "Bruk proxy",
791 307 => "Midlertidig omdirigering!",
792 308 => "Permanent omdirigering!",
793 400 => "Ugyldig forespørsel!",
794 401 => "Autentisering kreves!",
795 402 => "Betaling kreves!",
796 403 => "Adgang forbudt!",
797 404 => "Objektet ble ikke funnet!",
798 405 => "Metoden er ikke tillatt!",
799 406 => "Ikke akseptabelt!",
800 407 => "Proxy-autentisering kreves!",
801 408 => "Tidsgrense overskredet!",
802 409 => "Konflikt!",
803 410 => "Ressursen er ikke lenger tilgjengelig!",
804 411 => "Feil Content-Length!",
805 412 => "Forutsetning ikke oppfylt!",
806 413 => "Forespørselens innhold er for stort!",
807 414 => "Forespurt URI for lang!",
808 415 => "Mediatype støttes ikke!",
809 416 => "Område ikke tilfredsstillbart!",
810 417 => "Forventning kunne ikke oppfylles!",
811 418 => "Jeg er en tekanne",
812 421 => "Feiladressert forespørsel",
813 422 => "Kan ikke behandle enheten!",
814 423 => "Ressursen er låst!",
815 424 => "Avhengighet feilet!",
816 425 => "For tidlig!",
817 426 => "Oppgradering kreves!",
818 428 => "Forhåndsbetingelse kreves",
819 429 => "For mange forespørsler!",
820 431 => "Forespørselsheadere for store!",
821 444 => "Tilkobling lukket uten svar",
822 451 => "Ikke tilgjengelig av juridiske årsaker!",
823 499 => "Forespørsel lukket av klient",
824 500 => "Serverfeil!",
825 501 => "Kan ikke behandle forespørsel!",
826 502 => "Feil gateway!",
827 503 => "Tjenesten er ikke tilgjengelig!",
828 504 => "Tidsavbrudd i gateway!",
829 505 => "HTTP-versjon ikke støttet",
830 506 => "Varianten varierer også!",
831 507 => "Utilstrekkelig lagringsplass!",
832 508 => "Løkke oppdaget!",
833 509 => "Båndbreddegrense overskredet",
834 510 => "Ikke utvidet",
835 511 => "Nettverksautentisering kreves",
836 599 => "Tidsavbrudd for nettverkstilkobling",
837 },
838 nl_NL => {
839 100 => "Doorgaan",
840 101 => "Protocolwisseling",
841 102 => "Verwerken",
842 103 => "Vroege hints",
843 200 => "OK",
844 201 => "Aangemaakt",
845 202 => "Geaccepteerd",
846 203 => "Niet-gezaghebbende informatie",
847 204 => "Geen inhoud",
848 205 => "Inhoud herstellen",
849 206 => "Gedeeltelijke inhoud",
850 207 => "Multi-status",
851 208 => "Reeds gerapporteerd",
852 226 => "IM gebruikt",
853 300 => "Meerdere keuzes",
854 301 => "Permanent verplaatst!",
855 302 => "Gevonden (tijdelijke omleiding)!",
856 303 => "Zie andere",
857 304 => "Niet gewijzigd",
858 305 => "Proxy gebruiken",
859 307 => "Tijdelijke omleiding!",
860 308 => "Permanente omleiding!",
861 400 => "Ongeldig verzoek!",
862 401 => "Authenticatie vereist!",
863 402 => "Betaling vereist!",
864 403 => "Toegang verboden!",
865 404 => "Object niet gevonden!",
866 405 => "Methode niet toegestaan!",
867 406 => "Niet acceptabel!",
868 407 => "Proxy-authenticatie vereist!",
869 408 => "Tijdlimiet overschreden!",
870 409 => "Conflict!",
871 410 => "Dit object is niet langer beschikbaar!",
872 411 => "Ongeldige Content-Length!",
873 412 => "Voorwaarde niet voldaan!",
874 413 => "Aanvraaginhoud te groot!",
875 414 => "Aangeboden URI te lang!",
876 415 => "Niet-ondersteund mediatype!",
877 416 => "Bereik niet te vervullen!",
878 417 => "Expectation niet voldaan!",
879 418 => "Ik ben een theepot",
880 421 => "Verkeerd gerichte aanvraag",
881 422 => "Niet-verwerkbare entiteit!",
882 423 => "Bron vergrendeld!",
883 424 => "Mislukte afhankelijkheid!",
884 425 => "Te vroeg!",
885 426 => "Upgrade vereist!",
886 428 => "Voorwaarde vereist",
887 429 => "Te veel verzoeken!",
888 431 => "Verzoekheaders te groot!",
889 444 => "Verbinding gesloten zonder antwoord",
890 451 => "Niet beschikbaar om juridische redenen!",
891 499 => "Aanvraag door cliënt gesloten",
892 500 => "Serverfout!",
893 501 => "Kan verzoek niet verwerken!",
894 502 => "Verkeerde Gateway!",
895 503 => "Dienst niet beschikbaar!",
896 504 => "Gateway-time-out!",
897 505 => "HTTP-versie niet ondersteund",
898 506 => "Variant varieert ook!",
899 507 => "Onvoldoende opslagruimte!",
900 508 => "Lus gedetecteerd!",
901 509 => "Bandbreedtelimiet overschreden",
902 510 => "Niet uitgebreid",
903 511 => "Netwerkauthenticatie vereist",
904 599 => "Time-out bij netwerkverbinding",
905 },
906 pl_PL => {
907 100 => "Kontynuuj",
908 101 => "Zmiana protokołów",
909 102 => "Przetwarzanie",
910 103 => "Wczesne wskazówki",
911 200 => "OK",
912 201 => "Utworzono",
913 202 => "Przyjęto",
914 203 => "Informacja nieautorytatywna",
915 204 => "Brak treści",
916 205 => "Resetuj treść",
917 206 => "Częściowa treść",
918 207 => "Wiele statusów",
919 208 => "Już zgłoszono",
920 226 => "Użyto IM",
921 300 => "Wiele możliwości",
922 301 => "Trwale przeniesiono!",
923 302 => "Znaleziono (tymczasowe przekierowanie)!",
924 303 => "Zobacz inne",
925 304 => "Nie zmodyfikowano",
926 305 => "Użyj serwera proxy",
927 307 => "Tymczasowe przekierowanie!",
928 308 => "Stałe przekierowanie!",
929 400 => "Nieprawidłowe żądanie!",
930 401 => "Wymagane uwierzytelnienie!",
931 402 => "Wymagana płatność!",
932 403 => "Zabroniony dostęp!",
933 404 => "Nie znaleziono obiektu!",
934 405 => "Niedozwolona metoda!",
935 406 => "Nieakceptowalne!",
936 407 => "Wymagana autoryzacja proxy!",
937 408 => "Przedawnione żądanie!",
938 409 => "Konflikt!",
939 410 => "Zasób usunięty!",
940 411 => "Błędny nagłówek Content-Length!",
941 412 => "Warunek wstępny niespełniony!",
942 413 => "Treść żądania zbyt duża!",
943 414 => "Zbyt długie URI!",
944 415 => "Nieobsługiwany typ mediów!",
945 416 => "Zakres nie do zrealizowania!",
946 417 => "Oczekiwanie niespełnione!",
947 418 => "Jestem czajniczkiem",
948 421 => "Źle skierowane żądanie",
949 422 => "Nieprzetwarzalna jednostka!",
950 423 => "Zasób zablokowany!",
951 424 => "Błędna zależność!",
952 425 => "Zbyt wcześnie!",
953 426 => "Wymagana aktualizacja!",
954 428 => "Wymagany warunek wstępny",
955 429 => "Zbyt wiele żądań!",
956 431 => "Nagłówki żądania za duże!",
957 444 => "Połączenie zamknięte bez odpowiedzi",
958 451 => "Niedostępne z powodów prawnych!",
959 499 => "Żądanie zamknięte przez klienta",
960 500 => "Błąd serwera!",
961 501 => "Żądanie nieobsługiwane!",
962 502 => "Nieprawidłowa brama!",
963 503 => "Serwis niedostępny!",
964 504 => "Przekroczono limit czasu bramy!",
965 505 => "Wersja HTTP nieobsługiwana",
966 506 => "Wariant również się zmienia!",
967 507 => "Niewystarczająca przestrzeń dyskowa!",
968 508 => "Wykryto pętlę!",
969 509 => "Przekroczono limit przepustowości",
970 510 => "Nie rozszerzono",
971 511 => "Wymagane uwierzytelnienie sieciowe",
972 599 => "Przekroczono limit czasu połączenia sieciowego",
973 },
974 pt_BR => {
975 100 => "Continuar",
976 101 => "Mudando protocolos",
977 102 => "Processando",
978 103 => "Dicas iniciais",
979 200 => "OK",
980 201 => "Criado",
981 202 => "Aceito",
982 203 => "Informação não autoritativa",
983 204 => "Sem conteúdo",
984 205 => "Redefinir conteúdo",
985 206 => "Conteúdo parcial",
986 207 => "Multi-status",
987 208 => "Já reportado",
988 226 => "IM usado",
989 300 => "Múltiplas escolhas",
990 301 => "Movido permanentemente!",
991 302 => "Encontrado (redirecionamento temporário)!",
992 303 => "Ver outro",
993 304 => "Não modificado",
994 305 => "Usar proxy",
995 307 => "Redirecionamento temporário!",
996 308 => "Redirecionamento permanente!",
997 400 => "Requisição inválida!",
998 401 => "Autenticação necessária!",
999 402 => "Pagamento necessário!",
1000 403 => "Acesso Proibido!",
1001 404 => "Objeto não encontrado!",
1002 405 => "Método não permitido!",
1003 406 => "Não aceitável!",
1004 407 => "Autenticação de proxy necessária!",
1005 408 => "Tempo excedido!",
1006 409 => "Conflito!",
1007 410 => "Recurso não está mais disponível!",
1008 411 => "Content-Length inválido!",
1009 412 => "Falha na pré-condição!",
1010 413 => "Volume de dados muito grande!",
1011 414 => "URI enviado é muito longo!",
1012 415 => "Tipo de mídia não suportado!",
1013 416 => "Intervalo não satisfatível!",
1014 417 => "Expectativa não atendida!",
1015 418 => "Eu sou um bule de chá",
1016 421 => "Requisição mal direcionada",
1017 422 => "Entidade não processável!",
1018 423 => "Recurso bloqueado!",
1019 424 => "Dependência falhou!",
1020 425 => "Cedo demais!",
1021 426 => "Atualização necessária!",
1022 428 => "Pré-condição necessária",
1023 429 => "Muitas requisições!",
1024 431 => "Cabeçalhos de requisição muito grandes!",
1025 444 => "Conexão fechada sem resposta",
1026 451 => "Indisponível por motivos legais!",
1027 499 => "Requisição fechada pelo cliente",
1028 500 => "Erro interno do Servidor!",
1029 501 => "A requisição não pode ser processada!",
1030 502 => "Gateway inválido!",
1031 503 => "Serviço indisponível!",
1032 504 => "Tempo esgotado do gateway!",
1033 505 => "Versão HTTP não suportada",
1034 506 => "A variante também varia!",
1035 507 => "Armazenamento insuficiente!",
1036 508 => "Loop detectado!",
1037 509 => "Limite de banda excedido",
1038 510 => "Não estendido",
1039 511 => "Autenticação de rede necessária",
1040 599 => "Erro de tempo de conexão de rede",
1041 },
1042 pt_PT => {
1043 100 => "Continuar",
1044 101 => "A mudar protocolos",
1045 102 => "A processar",
1046 103 => "Dicas iniciais",
1047 200 => "OK",
1048 201 => "Criado",
1049 202 => "Aceite",
1050 203 => "Informação não autoritativa",
1051 204 => "Sem conteúdo",
1052 205 => "Repor conteúdo",
1053 206 => "Conteúdo parcial",
1054 207 => "Multi-estado",
1055 208 => "Já reportado",
1056 226 => "IM usado",
1057 300 => "Várias opções",
1058 301 => "Movido permanentemente!",
1059 302 => "Encontrado (redirecionamento temporário)!",
1060 303 => "Ver outro",
1061 304 => "Não modificado",
1062 305 => "Usar proxy",
1063 307 => "Redirecionamento temporário!",
1064 308 => "Redirecionamento permanente!",
1065 400 => "Pedido incorreto!",
1066 401 => "Autenticação necessária!",
1067 402 => "Pagamento exigido!",
1068 403 => "Acesso proibido!",
1069 404 => "Objeto não encontrado!",
1070 405 => "Método não permitido!",
1071 406 => "Não aceitável!",
1072 407 => "Autenticação de proxy necessária!",
1073 408 => "Tempo excedido!",
1074 409 => "Conflito!",
1075 410 => "Recurso já não está disponível!",
1076 411 => "Content-Length incorreto!",
1077 412 => "Falha na pré-condição!",
1078 413 => "Volume de dados demasiado grande!",
1079 414 => "URI demasiado longo!",
1080 415 => "Tipo de média não suportado!",
1081 416 => "Intervalo não satisfazível!",
1082 417 => "Expectativa não satisfeita!",
1083 418 => "Sou um bule de chá",
1084 421 => "Pedido mal direcionado",
1085 422 => "Entidade não processável!",
1086 423 => "Recurso bloqueado!",
1087 424 => "Dependência falhou!",
1088 425 => "Demasiado cedo!",
1089 426 => "Atualização necessária!",
1090 428 => "Pré-condição necessária",
1091 429 => "Pedidos em excesso!",
1092 431 => "Cabeçalhos de pedido muito grandes!",
1093 444 => "Ligação fechada sem resposta",
1094 451 => "Indisponível por motivos legais!",
1095 499 => "Pedido fechado pelo cliente",
1096 500 => "Erro interno do servidor!",
1097 501 => "Não posso processar o pedido!",
1098 502 => "Gateway inválido!",
1099 503 => "Serviço indisponível!",
1100 504 => "Tempo excedido na gateway!",
1101 505 => "Versão HTTP não suportada",
1102 506 => "A variante também varia!",
1103 507 => "Armazenamento insuficiente!",
1104 508 => "Loop detetado!",
1105 509 => "Limite de largura de banda excedido",
1106 510 => "Não estendido",
1107 511 => "Autenticação de rede necessária",
1108 599 => "Erro de tempo limite de ligação de rede",
1109 },
1110 ro_RO => {
1111 100 => "Continuați",
1112 101 => "Schimbarea protocoalelor",
1113 102 => "Se procesează",
1114 103 => "Indicii timpurii",
1115 200 => "OK",
1116 201 => "Creat",
1117 202 => "Acceptat",
1118 203 => "Informații neautoritare",
1119 204 => "Fără conținut",
1120 205 => "Resetați conținutul",
1121 206 => "Conținut parțial",
1122 207 => "Multi-status",
1123 208 => "Deja raportat",
1124 226 => "IM utilizat",
1125 300 => "Mai multe opțiuni",
1126 301 => "Mutat permanent!",
1127 302 => "Găsit (redirecționare temporară)!",
1128 303 => "Vezi altele",
1129 304 => "Neschimbat",
1130 305 => "Utilizați proxy",
1131 307 => "Redirecționare temporară!",
1132 308 => "Redirecționare permanentă!",
1133 400 => "Cerere nevalidă!",
1134 401 => "Autentificare necesară!",
1135 402 => "Plata necesară!",
1136 403 => "Accesul interzis!",
1137 404 => "Obiectul nu a fost gasit!",
1138 405 => "Metodă nepermisă!",
1139 406 => "Inacceptabil!",
1140 407 => "Este necesară autentificarea prin proxy!",
1141 408 => "Time-out al cererii!",
1142 409 => "Conflict!",
1143 410 => "Resursa nu mai este disponibilă!",
1144 411 => "Content-Length invalid!",
1145 412 => "Precondiția a eșuat!",
1146 413 => "Entitatea cererii este prea mare!",
1147 414 => "URI-ul trimis este prea lung!",
1148 415 => "Tip de date nesuportat!",
1149 416 => "Interval nesatisfiabil!",
1150 417 => "Așteptarea nu a fost îndeplinită!",
1151 418 => "Sunt un ceainic",
1152 421 => "Cerere direcționată greșit",
1153 422 => "Entitate imposibil de procesat!",
1154 423 => "Resursa este blocată!",
1155 424 => "Dependență eșuată!",
1156 425 => "Prea devreme!",
1157 426 => "Actualizare necesară!",
1158 428 => "Precondiție necesară",
1159 429 => "Prea multe cereri!",
1160 431 => "Antete de cerere prea mari!",
1161 444 => "Conexiune închisă fără răspuns",
1162 451 => "Indisponibil din motive legale!",
1163 499 => "Cerere închisă de client",
1164 500 => "Eroare server!",
1165 501 => "Cererea nu poate fi procesată!",
1166 502 => "Gateway invalid!",
1167 503 => "Serviciu indisponibil!",
1168 504 => "Depășire de timp a gateway-ului!",
1169 505 => "Versiune HTTP nesuportată",
1170 506 => "Varianta variază, de asemenea!",
1171 507 => "Spațiu de stocare insuficient!",
1172 508 => "Buclă detectată!",
1173 509 => "Limită de lățime de bandă depășită",
1174 510 => "Neextins",
1175 511 => "Autentificare de rețea necesară",
1176 599 => "Eroare: expirare timp conexiune la rețea",
1177 },
1178 # Ref: <https://ru.wikipedia.org/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BA%D0%BE%D0%B4%D0%BE%D0%B2_%D1%81%D0%BE%D1%81%D1%82%D0%BE%D1%8F%D0%BD%D0%B8%D1%8F_HTTP>
1179 # <https://developer.roman.grinyov.name/blog/80>
1180 ru_RU => {
1181 100 => "продолжай",
1182 101 => "переключение протоколов",
1183 102 => "идёт обработка",
1184 103 => "ранняя метаинформация",
1185 200 => "хорошо",
1186 201 => "создано",
1187 202 => "принято",
1188 203 => "информация не авторитетна",
1189 204 => "нет содержимого",
1190 205 => "сбросить содержимое",
1191 206 => "частичное содержимое",
1192 207 => "многостатусный",
1193 208 => "уже сообщалось",
1194 226 => "использовано IM",
1195 300 => "множество выборов",
1196 301 => "Перемещено навсегда!",
1197 302 => "Найдено (временное перенаправление)!",
1198 303 => "смотреть другое",
1199 304 => "не изменялось",
1200 305 => "использовать прокси",
1201 307 => "Временное перенаправление!",
1202 308 => "Постоянное перенаправление!",
1203 400 => "Неверный запрос!",
1204 401 => "Необходима аутентификация!",
1205 402 => "Требуется оплата!",
1206 403 => "Доступ запрещён!",
1207 404 => "Объект не найден!",
1208 405 => "Метод не поддерживается!",
1209 406 => "Неприемлемо!",
1210 407 => "Требуется аутентификация прокси!",
1211 408 => "Истекло время ожидания!",
1212 409 => "Конфликт!",
1213 410 => "Документ удалён!",
1214 411 => "Неверный заголовок Content-Length!",
1215 412 => "Предусловие не выполнено!",
1216 413 => "Размер запроса слишком велик!",
1217 414 => "URI слишком длинный!",
1218 415 => "Неподдерживаемый тип медиа!",
1219 416 => "Диапазон не может быть удовлетворён!",
1220 417 => "Ожидание не выполнено!",
1221 418 => "я - чайник",
1222 421 => "Неверно адресованный запрос",
1223 422 => "Необрабатываемая сущность!",
1224 423 => "Ресурс заблокирован!",
1225 424 => "Сбой зависимости!",
1226 425 => "Слишком рано!",
1227 426 => "Требуется обновление!",
1228 428 => "необходимо предусловие",
1229 429 => "Слишком много запросов!",
1230 431 => "Заголовки запроса слишком велики!",
1231 444 => "Соединение закрыто без ответа",
1232 451 => "Недоступно по юридическим причинам!",
1233 499 => "клиент закрыл соединение",
1234 500 => "Ошибка сервера!",
1235 501 => "Запрос не может быть обработан!",
1236 502 => "Неверный шлюз!",
1237 503 => "Сервис недоступен!",
1238 504 => "Тайм-аут шлюза!",
1239 505 => "версия HTTP не поддерживается",
1240 506 => "Вариант также меняется!",
1241 507 => "Недостаточно памяти для хранения!",
1242 508 => "Обнаружен цикл!",
1243 509 => "исчерпана пропускная ширина канала",
1244 510 => "не расширено",
1245 511 => "требуется сетевая аутентификация",
1246 599 => "Ошибка тайм-аута сетевого подключения",
1247 },
1248 sr_RS => {
1249 100 => "Настави",
1250 101 => "Промена протокола",
1251 102 => "Обрада у току",
1252 103 => "Рани наговештаји",
1253 200 => "У реду",
1254 201 => "Креирано",
1255 202 => "Прихваћено",
1256 203 => "Неауторитативне информације",
1257 204 => "Нема садржаја",
1258 205 => "Ресет садржаја",
1259 206 => "Делимичан садржај",
1260 207 => "Вишестатус",
1261 208 => "Већ пријављено",
1262 226 => "ИМ коришћен",
1263 300 => "Више избора",
1264 301 => "Трајно премештено!",
1265 302 => "Пронађено (привремено преусмеравање)!",
1266 303 => "Погледај друго",
1267 304 => "Није измењено",
1268 305 => "Користи прокси",
1269 307 => "Привремено преусмеравање!",
1270 308 => "Трајно преусмеравање!",
1271 400 => "Лош захтев!",
1272 401 => "Обавезна аутентификација!",
1273 402 => "Потребно плаћање!",
1274 403 => "Забрањен приступ!",
1275 404 => "Објекат није пронађен!",
1276 405 => "Метод није дозвољен!",
1277 406 => "Неприхватљиво!",
1278 407 => "Потребна је прокси аутентикација!",
1279 408 => "Захтеву је истекло време!",
1280 409 => "Сукоб!",
1281 410 => "Ресурс није више доступан!",
1282 411 => "Неисправно Content-Length заглавље!",
1283 412 => "Предуслов није испуњен!",
1284 413 => "Тело захтева је превелико!",
1285 414 => "Послати УРИ је предугачак!",
1286 415 => "Неподржана врста медија!",
1287 416 => "Опсег није могуће испунити!",
1288 417 => "Очекивање није испуњено!",
1289 418 => "Ја сам чајник",
1290 421 => "Погрешно усмерен захтев",
1291 422 => "Необрадив ентитет!",
1292 423 => "Ресурс је закључан!",
1293 424 => "Неуспела зависност!",
1294 425 => "Прерано!",
1295 426 => "Потребна надоградња!",
1296 428 => "Потребан предуслов",
1297 429 => "Превише захтева!",
1298 431 => "Заглавља захтева су превелика!",
1299 444 => "Веза затворена без одговора",
1300 451 => "Недоступно из правних разлога!",
1301 499 => "Клијент је затворио захтев",
1302 500 => "Грешка сервера!",
1303 501 => "Не могу да обрадим захтев!",
1304 502 => "Лош пролаз!",
1305 503 => "Услуга је недоступна!",
1306 504 => "Истекло време пролаза (gateway)!",
1307 505 => "HTTP верзија није подржана",
1308 506 => "Варијанта такође варира!",
1309 507 => "Недовољно простора за складиштење!",
1310 508 => "Откривена петља!",
1311 509 => "Превазиђено ограничење пропусног опсега",
1312 510 => "Није проширено",
1313 511 => "Потребна мрежна аутентификација",
1314 599 => "Грешка: истек времена на мрежној вези",
1315 },
1316 sv_SE => {
1317 100 => "Fortsätt",
1318 101 => "Växlar protokoll",
1319 102 => "Bearbetar",
1320 103 => "Tidiga tips",
1321 200 => "OK",
1322 201 => "Skapad",
1323 202 => "Accepterad",
1324 203 => "Icke-auktoritativ information",
1325 204 => "Inget innehåll",
1326 205 => "Återställ innehåll",
1327 206 => "Partiellt innehåll",
1328 207 => "Multi-status",
1329 208 => "Redan rapporterat",
1330 226 => "IM används",
1331 300 => "Flera val",
1332 301 => "Flyttad permanent!",
1333 302 => "Hittad (tillfällig omdirigering)!",
1334 303 => "Se annat",
1335 304 => "Inte ändrad",
1336 305 => "Använd proxy",
1337 307 => "Tillfällig omdirigering!",
1338 308 => "Permanent omdirigering!",
1339 400 => "Felaktig förfrågan!",
1340 401 => "Autentisering krävs!",
1341 402 => "Betalning krävs!",
1342 403 => "Åtkomst förbjuden!",
1343 404 => "Objektet hittas ej!",
1344 405 => "Metoden inte tillåten!",
1345 406 => "Inte acceptabelt!",
1346 407 => "Proxyautentisering krävs!",
1347 408 => "Tidsgränsen överskreds!",
1348 409 => "Konflikt!",
1349 410 => "Resursen är inte längre tillgänglig!",
1350 411 => "Felaktig Content-Length!",
1351 412 => "Förhandsvillkor uppfylldes inte!",
1352 413 => "Begärans innehåll är för stort!",
1353 414 => "Efterfrågad URI för lång!",
1354 415 => "Mediatypen stöds ej!",
1355 416 => "Begärt intervall kan inte tillgodoses!",
1356 417 => "Förväntan uppfylldes inte!",
1357 418 => "Jag är en tekanna",
1358 421 => "Feladresserad begäran",
1359 422 => "Obehandlingsbar enhet!",
1360 423 => "Resursen är låst!",
1361 424 => "Misslyckat beroende!",
1362 425 => "För tidigt!",
1363 426 => "Uppgradering krävs!",
1364 428 => "Förhandsvillkor krävs",
1365 429 => "För många förfrågningar!",
1366 431 => "Begäransrubriker för stora!",
1367 444 => "Anslutning stängd utan svar",
1368 451 => "Otillgänglig av juridiska skäl!",
1369 499 => "Begäran stängd av klienten",
1370 500 => "Serverfel!",
1371 501 => "Kan inte behandla begäran!",
1372 502 => "Felaktig Gateway!",
1373 503 => "Tjänsten ej tillgänglig!",
1374 504 => "Tidsgräns i gateway överskreds!",
1375 505 => "HTTP-version stöds inte",
1376 506 => "Varianten varierar också!",
1377 507 => "Otillräckligt lagringsutrymme!",
1378 508 => "Loop upptäckt!",
1379 509 => "Bandbreddsgräns överskriden",
1380 510 => "Inte utökad",
1381 511 => "Nätverksautentisering krävs",
1382 599 => "Tidsgräns för nätverksanslutning överskreds",
1383 },
1384 tr_TR => {
1385 100 => "Devam et",
1386 101 => "Protokoller değiştiriliyor",
1387 102 => "İşleniyor",
1388 103 => "Erken ipuçları",
1389 200 => "Tamam",
1390 201 => "Oluşturuldu",
1391 202 => "Kabul edildi",
1392 203 => "Yetkili olmayan bilgi",
1393 204 => "İçerik yok",
1394 205 => "İçeriği sıfırla",
1395 206 => "Kısmi içerik",
1396 207 => "Çoklu durum",
1397 208 => "Zaten bildirildi",
1398 226 => "IM kullanıldı",
1399 300 => "Birden çok seçenek",
1400 301 => "Kalıcı olarak taşındı!",
1401 302 => "Bulundu (geçici yönlendirme)!",
1402 303 => "Başka bir yere bakın",
1403 304 => "Değiştirilmedi",
1404 305 => "Vekil sunucu kullan",
1405 307 => "Geçici yönlendirme!",
1406 308 => "Kalıcı yönlendirme!",
1407 400 => "Hatalı istek!",
1408 401 => "Kimlik doğrulama gerekli!",
1409 402 => "Ödeme gerekli!",
1410 403 => "Erişim engellendi!",
1411 404 => "Nesne mevcut değil!",
1412 405 => "Yönteme izin verilmedi!",
1413 406 => "Kabul edilemez!",
1414 407 => "Vekil sunucu kimlik doğrulaması gerekli!",
1415 408 => "İstekte zaman aşımı!",
1416 409 => "Çakışma!",
1417 410 => "Kaynak artık mevcut değil!",
1418 411 => "Hatalı Content-Length başlığı!",
1419 412 => "Önkoşul karşılanamadı!",
1420 413 => "İstek gövdesi çok büyük!",
1421 414 => "Gönderilen URI çok uzun!",
1422 415 => "Desteklenmeyen ortam türü!",
1423 416 => "Aralık karşılanamaz!",
1424 417 => "Beklenti karşılanamadı!",
1425 418 => "Ben bir çaydanlığım",
1426 421 => "Yanlış yönlendirilmiş istek",
1427 422 => "İşlenemeyen varlık!",
1428 423 => "Kaynak kilitlendi!",
1429 424 => "Bağımlılık başarısız!",
1430 425 => "Çok erken!",
1431 426 => "Yükseltme gerekli!",
1432 428 => "Önkoşul gerekli",
1433 429 => "Çok fazla istek!",
1434 431 => "İstek başlıkları çok büyük!",
1435 444 => "Yanıt verilmeden bağlantı kapatıldı",
1436 451 => "Hukuki nedenlerle kullanılamıyor!",
1437 499 => "İstek istemci tarafından kapatıldı",
1438 500 => "Sunucu hatası!",
1439 501 => "İstek yerine getirilemiyor!",
1440 502 => "Hatalı Ağ Geçidi!",
1441 503 => "Hizmet sunulamıyor!",
1442 504 => "Ağ geçidi zaman aşımı!",
1443 505 => "HTTP sürümü desteklenmiyor",
1444 506 => "Varyant da değişiyor!",
1445 507 => "Yetersiz depolama alanı!",
1446 508 => "Döngü tespit edildi!",
1447 509 => "Bant genişliği sınırı aşıldı",
1448 510 => "Genişletilmemiş",
1449 511 => "Ağ kimlik doğrulaması gerekli",
1450 599 => "Ağ bağlantısı zaman aşımı hatası",
1451 },
1452 # Ref: <https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status>
1453 # <https://www.websiterating.com/zh-CN/resources/http-status-codes-cheat-sheet/>
1454 # <https://zh.wikipedia.org/wiki/HTTP%E7%8A%B6%E6%80%81%E7%A0%81>
1455 # <https://learn.microsoft.com/zh-cn/onedrive/developer/rest-api/concepts/errors?view=odsp-graph-online>
1456 # <https://tinychen.com/20200717-http-code-introduction/>
1457 zh_CN => {
1458 100 => "继续",
1459 101 => "切换协议",
1460 102 => "处理中",
1461 103 => "早期提示",
1462 200 => "OK",
1463 201 => "创建",
1464 202 => "已接受",
1465 203 => "非权威信息",
1466 204 => "无内容",
1467 205 => "重置内容",
1468 206 => "部分内容",
1469 207 => "多状态",
1470 208 => "已报告",
1471 226 => "IM已使用",
1472 300 => "多项选择",
1473 301 => "已永久移动!",
1474 302 => "已找到(临时重定向)!",
1475 303 => "查看其他",
1476 304 => "未修改",
1477 305 => "使用代理",
1478 307 => "临时重定向!",
1479 308 => "永久重定向!",
1480 400 => "无效请求!",
1481 401 => "需要认证!",
1482 402 => "需要付款!",
1483 403 => "禁止访问!",
1484 404 => "找不到对象!",
1485 405 => "请求的方法不允许!",
1486 406 => "不可接受!",
1487 407 => "需要代理身份验证!",
1488 408 => "请求超时!",
1489 409 => "冲突!",
1490 410 => "资源不再可用!",
1491 411 => "无效的 Content-Length!",
1492 412 => "先决条件未满足!",
1493 413 => "请求体过大!",
1494 414 => "提交的 URI 过长!",
1495 415 => "不支持的媒体类型!",
1496 416 => "范围无法满足!",
1497 417 => "未能满足请求期望!",
1498 418 => "我是一个茶壶",
1499 421 => "错误定向的请求",
1500 422 => "无法处理的实体!",
1501 423 => "资源已锁定!",
1502 424 => "依赖失败!",
1503 425 => "为时过早!",
1504 426 => "需要升级!",
1505 428 => "需要前提条件",
1506 429 => "请求过多!",
1507 431 => "请求头字段过大!",
1508 444 => "连接关闭没有响应",
1509 451 => "因法律原因无法提供!",
1510 499 => "客户关闭请求",
1511 500 => "服务器错误!",
1512 501 => "无法执行请求!",
1513 502 => "错误的网关!",
1514 503 => "服务不可用!",
1515 504 => "网关超时!",
1516 505 => "不支持的HTTP版本",
1517 506 => "变体也会变化!",
1518 507 => "存储空间不足!",
1519 508 => "检测到循环!",
1520 509 => "超出带宽限制",
1521 510 => "未扩展",
1522 511 => "需要网络身份验证",
1523 599 => "网络连接超时错误",
1524 },
1525 # Ref: <https://zh.wikipedia.org/zh-tw/HTTP%E7%8A%B6%E6%80%81%E7%A0%81>
1526 # <https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Status>
1527 # <https://www.websitehostingrating.com/zh-TW/http-status-codes-cheat-sheet/>
1528 zh_TW => {
1529 100 => "繼續",
1530 101 => "交換協議",
1531 102 => "處理",
1532 103 => "早期提示",
1533 200 => "OK",
1534 201 => "已創建",
1535 202 => "已收到請求",
1536 203 => "非權威信息",
1537 204 => "沒有內容",
1538 205 => "重設內容",
1539 206 => "部分內容",
1540 207 => "多重狀態",
1541 208 => "已報告",
1542 226 => "使用了IM",
1543 300 => "多重選擇",
1544 301 => "已永久移動!",
1545 302 => "已找到(臨時重新導向)!",
1546 303 => "查看其他",
1547 304 => "未修改",
1548 305 => "使用代理",
1549 307 => "臨時重新導向!",
1550 308 => "永久重新導向!",
1551 400 => "請求錯誤!",
1552 401 => "需要認證!",
1553 402 => "需要付款!",
1554 403 => "禁止訪問!",
1555 404 => "找不到物件!",
1556 405 => "請求的方法不允許!",
1557 406 => "不可接受!",
1558 407 => "需要代理伺服器驗證!",
1559 408 => "請求超時!",
1560 409 => "衝突!",
1561 410 => "資源不再可用!",
1562 411 => "無效的 Content-Length!",
1563 412 => "先決條件未滿足!",
1564 413 => "請求體過大!",
1565 414 => "提交的 URI 過長!",
1566 415 => "不支援的媒體型式!",
1567 416 => "無法滿足請求範圍!",
1568 417 => "未能滿足請求期望!",
1569 418 => "我是茶壺",
1570 421 => "錯誤定向的請求",
1571 422 => "無法處理的實體!",
1572 423 => "資源已鎖定!",
1573 424 => "相依關係失敗!",
1574 425 => "時機過早!",
1575 426 => "需要升級!",
1576 428 => "需要先決條件",
1577 429 => "請求過多!",
1578 431 => "請求標頭欄位過大!",
1579 444 => "連接關閉而沒有響應",
1580 451 => "因法律因素無法提供!",
1581 499 => "用戶端關閉請求",
1582 500 => "伺服器錯誤!",
1583 501 => "無法執行請求!",
1584 502 => "閘道器錯誤!",
1585 503 => "服務不可用!",
1586 504 => "閘道逾時!",
1587 505 => "不支持HTTP版本",
1588 506 => "變體也會變化!",
1589 507 => "儲存空間不足!",
1590 508 => "偵測到循環!",
1591 509 => "超過帶寬限制",
1592 510 => "未擴展",
1593 511 => "需要網路驗證",
1594 599 => "網絡連接超時錯誤",
1595 },
1596 };
1597 our $CODES_LANG_SHORT =
1598 {
1599 de => 'de_DE',
1600 en => 'en_GB',
1601 fr => 'fr_FR',
1602 ja => 'ja_JP',
1603 ko => 'ko_KR',
1604 ru => 'ru_RU',
1605 zh => 'zh_TW',
1606 };
1607 }
1608  
1609 use strict;
1610 use warnings;
1611  
1612 sub init
1613 {
1614 my $self = shift( @_ );
1615 $self->{_init_strict_use_sub} = 1;
1616 $self->SUPER::init( @_ ) || return( $self->pass_error );
1617 return( $self );
1618 }
1619  
1620 sub convert_short_lang_to_long
1621 {
1622 my $self = shift( @_ );
1623 my $lang = shift( @_ );
1624 # Nothing to do; we already have a good value
1625 return( $lang ) if( $lang =~ /^[a-z]{2}_[A-Z]{2}$/ );
1626 return( $CODES_LANG_SHORT->{ lc( $lang ) } ) if( CORE::exists( $CODES_LANG_SHORT->{ lc( $lang ) } ) );
1627 return( '' );
1628 }
1629  
1630 sub is_cacheable_by_default
1631 {
1632 my $self = shift( @_ );
1633 my $code = shift( @_ );
1634 return( $self->error( "A 3 digit code is required." ) ) if( !defined( $code ) || $code !~ /^\d{3}$/ );
1635 return(
1636 $code == 200 # OK
1637 || $code == 203 # Non-Authoritative Information
1638 || $code == 204 # No Content
1639 || $code == 206 # Not Acceptable
1640 || $code == 300 # Multiple Choices
1641 || $code == 301 # Moved Permanently
1642 || $code == 308 # Permanent Redirect
1643 || $code == 404 # Not Found
1644 || $code == 405 # Method Not Allowed
1645 || $code == 410 # Gone
1646 || $code == 414 # Request-URI Too Large
1647 || $code == 451 # Unavailable For Legal Reasons
1648 || $code == 501 # Not Implemented
1649 );
1650 }
1651  
1652 sub is_client_error { return( shift->_min_max( 400 => 500, @_ ) ); }
1653  
1654 sub is_error { return( shift->_min_max( 400 => 600, @_ ) ); }
1655  
1656 sub is_info { return( shift->_min_max( 100 => 200, @_ ) ); }
1657  
1658 sub is_redirect { return( shift->_min_max( 300 => 400, @_ ) ); }
1659  
1660 sub is_server_error { return( shift->_min_max( 500 => 600, @_ ) ); }
1661  
1662 sub is_success { return( shift->_min_max( 200 => 300, @_ ) ); }
1663  
1664 # Returns a status line for a given code
1665 # e.g. status_message( 404 ) would yield "Not found"
1666 # sub status_message { return( Apache2::RequestUtil::get_status_line( $_[1] ) ); }
1667 sub status_message
1668 {
1669 my $self = shift( @_ );
1670 my( $code, $lang );
1671 if( scalar( @_ ) == 2 )
1672 {
1673 ( $code, $lang ) = @_;
1674 }
1675 else
1676 {
1677 $code = shift( @_ );
1678 $lang = 'en_GB';
1679 }
1680 $lang = 'en_GB' if( !exists( $CODES_LOCALE->{ $lang } ) );
1681 my $ref = $CODES_LOCALE->{ $lang };
1682 return( $ref->{ $code } );
1683 }
1684  
1685 sub supported_languages
1686 {
1687 my $self = shift( @_ );
1688 return( [sort( keys( %$CODES_LOCALE ) )] );
1689 }
1690  
1691 sub _min_max
1692 {
1693 my $this = shift( @_ );
1694 my( $min, $max, $code ) = @_;
1695 no warnings 'uninitialized';
1696 return( $this->error( "No status code was provided." ) ) if( !length( $code // '' ) );
1697 return( $this->error( "A 3 digit code is required." ) ) if( $code !~ /^\d{3}$/ );
1698 return( $code >= $min && $code < $max );
1699 }
1700  
1701 # NOTE: sub FREEZE is inherited
1702  
1703 sub STORABLE_freeze { CORE::return( CORE::shift->FREEZE( @_ ) ); }
1704  
1705 sub STORABLE_thaw { CORE::return( CORE::shift->THAW( @_ ) ); }
1706  
1707 # NOTE: sub THAW is inherited
1708  
1709 1;
1710 # NOTE: POD
1711 __END__
1712  
1713 =encoding utf-8
1714  
1715 =head1 NAME
1716  
1717 HTTP::Promise::Status - HTTP Status Codes & Locale Equivalents
1718  
1719 =head1 SYNOPSIS
1720  
1721 use HTTP::Promise::Status ':common';
1722 use HTTP::Promise::Status ':all';
1723 say HTTP::Promise::Status::HTTP_TOO_MANY_REQUESTS;
1724 # returns code 429
1725  
1726 say $HTTP::Promise::Status::CODES_LOCALE->{fr_FR}->{429} # Trop de requête
1727 # In Japanese: リクエスト過大で拒否した
1728 say $HTTP::Promise::Status::CODES_LOCALE->{ja_JP}->{429}
1729  
1730 But maybe more simply:
1731  
1732 my $status = HTTP::Promise::Status->new;
1733 say $status->status_message( 429 => 'ja_JP' );
1734 # Or without the language code parameter, it will default to en_GB
1735 say $status->status_message( 429 );
1736  
1737 # Is success
1738 say $status->is_info( 102 ); # true
1739 say $status->is_success( 200 ); # true
1740 say $status->is_redirect( 302 ); # true
1741 say $status->is_error( 404 ); # true
1742 say $status->is_client_error( 403 ); # true
1743 say $status->is_server_error( 501 ); # true
1744  
1745 =head1 VERSION
1746  
1747 v0.1.0
1748  
1749 =head1 DESCRIPTION
1750  
1751 This module allows the access of http constants similar to mod_perl and using their numeric value, and also allows to get the localised version of the http status for a given code for currently supported languages: fr_FR (French), en_GB (British English) and ja_JP (Japanese), de_DE (German), ko_KR (Korean), ru_RU (Russian), zh_TW (Taiwanese).
1752  
1753 It also provides some functions to check if a given code is an information, success, redirect, error, client error or server error code.
1754  
1755 =head1 METHODS
1756  
1757 =head2 init
1758  
1759 Creates an instance of L<HTTP::Promise::Status> and returns the object.
1760  
1761 =head2 convert_short_lang_to_long
1762  
1763 Given a 2 characters language code (not case sensitive) and this will return its iso 639 5 characters equivalent for supported languages.
1764  
1765 For example:
1766  
1767 HTTP::Promise::Status->convert_short_lang_to_long( 'zh' );
1768 # returns: zh_TW
1769  
1770 =head2 is_cacheable_by_default
1771  
1772 Return true if the 3-digits code provided indicates that a response is cacheable by default, and it can be reused by a cache with heuristic expiration. All other status codes are not cacheable by default. See L<RFC 7231 - HTTP/1.1 Semantics and Content, Section 6.1. Overview of Status Codes|https://tools.ietf.org/html/rfc7231#section-6.1>.
1773  
1774 =head2 is_client_error
1775  
1776 Returns true if the 3-digits code provided is between 400 and 500
1777  
1778 =head2 is_error
1779  
1780 Returns true if the 3-digits code provided is between 400 and 600
1781  
1782 =head2 is_info
1783  
1784 Returns true if the 3-digits code provided is between 100 and 200
1785  
1786 =head2 is_redirect
1787  
1788 Returns true if the 3-digits code provided is between 300 and 400
1789  
1790 =head2 is_server_error
1791  
1792 Returns true if the 3-digits code provided is between 500 and 600
1793  
1794 =head2 is_success
1795  
1796 Returns true if the 3-digits code provided is between 200 and 300
1797  
1798 =head2 status_message
1799  
1800 Provided with a 3-digits http code and an optional language code such as C<en_GB> and this will return the status message in its localised form.
1801  
1802 This is useful to provide response to error in the user preferred language. You can also use it to set a json response with the http error code along with a localised status message.
1803  
1804 If no language code is provided, this will default to C<en_GB>.
1805  
1806 See L</supported_languages> for the supported languages.
1807  
1808 =head2 supported_languages
1809  
1810 This will return a sorted array reference of support languages for status codes.
1811  
1812 The following language codes are currently supported: de_DE (German), en_GB (British English), fr_FR (French), ja_JP (Japanese), ko_KR (Korean), ru_RU (Russian) and zh_TW (Traditional Chinese as spoken in Taiwan).
1813  
1814 Feel free to contribute those codes in other languages.
1815  
1816 =head1 CONSTANTS
1817  
1818 The following constants can be exported. You can use the C<:all> tag to export them all, such as:
1819  
1820 use HTTP::Promise::Status qw( :all );
1821  
1822 or you can use the tag C<:common> to export the following common status codes:
1823  
1824 HTTP_NETWORK_AUTHENTICATION_REQUIRED
1825 HTTP_FORBIDDEN
1826 HTTP_NOT_FOUND
1827 HTTP_OK
1828 HTTP_TEMPORARY_REDIRECT
1829 HTTP_INTERNAL_SERVER_ERROR
1830  
1831 =head2 HTTP_CONTINUE (100)
1832  
1833 See L<rfc 7231, section 5.1.1|https://tools.ietf.org/html/rfc7231#section-5.1.1> and section L<6.2.1|https://tools.ietf.org/html/rfc7231#section-6.2.1> and L<Mozilla docs|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100>
1834  
1835 This is provisional response returned by the web server upon an abbreviated request to find out whether the web server will accept the actual request. For example when the client is sending a large file in chunks, such as in C<PUT> request (here a 742MB file):
1836  
1837 PUT /some//big/file.mp4 HTTP/1.1
1838 Host: www.example.org
1839 Content-Type: video/mp4
1840 Content-Length: 778043392
1841 Expect: 100-continue
1842  
1843 If the server refused, it could return a C<413 Request Entity Too Large> or C<405 Method Not Allowed> or even C<401 Unauthorized>, or even a C<417 Expectation Failed> if it does not support this feature.
1844  
1845 A response C<417 Expectation Failed> means the server is likely a HTTP/1.0 server or does not understand the request and the actual request must be sent, i.e. without the header field C<Expect: 100-continue>
1846  
1847 In some REST API implementation, the server response code C<417> is used to mean the server understood the requested, but rejected it. This is a divergent use of the original purpose of this code.
1848  
1849 =head2 HTTP_SWITCHING_PROTOCOLS (101)
1850  
1851 See L<rfc7231, section 6.2.2|https://tools.ietf.org/html/rfc7231#section-6.2.2>
1852  
1853 This is used to indicate that the TCP conncection is switching to a different protocol.
1854  
1855 This is typically used for the L<WebSocket> protocol, which uses initially a HTTP handshake when establishing the connection. For example:
1856  
1857 GET /chat HTTP/1.1
1858 Host: server.example.com
1859 Upgrade: websocket
1860 Connection: Upgrade
1861 Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
1862 Origin: http://example.com
1863 Sec-WebSocket-Protocol: chat, superchat
1864 Sec-WebSocket-Version: 13
1865  
1866 Then the server could reply something like:
1867  
1868 HTTP/1.1 101 Switching Protocols
1869 Upgrade: websocket
1870 Connection: Upgrade
1871 Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
1872 Sec-WebSocket-Protocol: chat
1873  
1874 =head2 HTTP_PROCESSING (102)
1875  
1876 See L<rfc 2518 on WebDAV|https://tools.ietf.org/html/rfc2518>
1877  
1878 This is returned to notify the client that the server is currently processing the request and that it is taking some time.
1879  
1880 The server could return repeated instance of this response code until it is done processing the request and then send back the actual final response headers.
1881  
1882 =head2 HTTP_EARLY_HINTS (103)
1883  
1884 See L<rfc 8297 on Indicating Hints|https://tools.ietf.org/html/rfc8297>
1885  
1886 This is a preemptive return code to notify the client to make some optimisations, while the actual final response headers are sent later. For example:
1887  
1888 HTTP/1.1 103 Early Hints
1889 Link: </style.css>; rel=preload; as=style
1890 Link: </script.js>; rel=preload; as=script
1891  
1892 then, a few seconds, or minutes later:
1893  
1894 HTTP/1.1 200 OK
1895 Date: Mon, 16 Apr 2022 02:15:12 GMT
1896 Content-Length: 1234
1897 Content-Type: text/html; charset=utf-8
1898 Link: </style.css>; rel=preload; as=style
1899 Link: </script.js>; rel=preload; as=script
1900  
1901 =head2 HTTP_OK (200)
1902  
1903 See L<rfc7231, section 6.3.1|https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.1>
1904  
1905 This is returned to inform the request has succeeded. It can also alternatively be C<204 No Content> when there is no response body.
1906  
1907 For example:
1908  
1909 HTTP/1.1 200 OK
1910 Content-Type: text/html; charset=utf-8
1911 Content-Length: 184
1912 Connection: keep-alive
1913 Cache-Control: s-maxage=300, public, max-age=0
1914 Content-Language: en-US
1915 Date: Mon, 18 Apr 2022 17:37:18 GMT
1916 ETag: "2e77ad1dc6ab0b53a2996dfd4653c1c3"
1917 Server: Apache/2.4
1918 Strict-Transport-Security: max-age=63072000
1919 X-Content-Type-Options: nosniff
1920 X-Frame-Options: DENY
1921 X-XSS-Protection: 1; mode=block
1922 Vary: Accept-Encoding,Cookie
1923 Age: 7
1924  
1925 <!DOCTYPE html>
1926 <html lang="en">
1927 <head>
1928 <meta charset="utf-8">
1929 <title>A simple webpage</title>
1930 </head>
1931 <body>
1932 <h1>Simple HTML5 webpage</h1>
1933 <p>Hello, world!</p>
1934 </body>
1935 </html>
1936  
1937 =head2 HTTP_CREATED (201)
1938  
1939 See L<rfc7231, section 6.3.2|https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.2>
1940  
1941 This is returned to notify the related resource has been created, most likely by a C<PUT> request, such as:
1942  
1943 PUT /some/where HTTP/1.1
1944 Content-Type: text/html
1945 Host: example.org
1946  
1947 Then, the server would reply:
1948  
1949 HTTP/1.1 201 Created
1950 ETag: "foo-bar"
1951  
1952 =head2 HTTP_ACCEPTED (202)
1953  
1954 See L<rfc7231, section 6.3.3|https://tools.ietf.org/html/rfc7231#section-6.3.3>
1955  
1956 This is returned when the web server has accepted the request, without guarantee of successful completion.
1957  
1958 Thus, the remote service would typically send an email to inform the user of the status, or maybe provide a link in the header. For example:
1959  
1960 POST /some/where HTTP/1.1
1961 Content-Type: application/json
1962  
1963 Then the server response:
1964  
1965 HTTP/1.1 202 Accepted
1966 Link: </some/status/1234> rel="https://example.org/status"
1967 Content-Length: 0
1968  
1969 =head2 HTTP_NON_AUTHORITATIVE (203)
1970  
1971 See L<rfc 7231, section 6.3.4|https://tools.ietf.org/html/rfc7231#section-6.3.4>
1972  
1973 This would typically be returned by an HTTP proxy after it has made some change to the content.
1974  
1975 =head2 HTTP_NO_CONTENT (204)
1976  
1977 L<See rfc 7231, section 6.3.5|https://tools.ietf.org/html/rfc7231#section-6.3.5>
1978  
1979 This is returned when the request was processed successfully, but there is no body content returned.
1980  
1981 =head2 HTTP_RESET_CONTENT (205)
1982  
1983 L<See rfc 7231, section 6.3.6|https://tools.ietf.org/html/rfc7231#section-6.3.6>
1984  
1985 This is to inform the client the request was successfully processed and the content should be reset, like a web form.
1986  
1987 =head2 HTTP_PARTIAL_CONTENT (206)
1988  
1989 See L<rfc 7233 on Range Requests|https://tools.ietf.org/html/rfc7233>
1990  
1991 This is returned in response to a request for partial content, such as a certain number of bytes from a video. For example:
1992  
1993 GET /video.mp4 HTTP/1.1
1994 Range: bytes=1048576-2097152
1995  
1996 Then, the server would reply something like:
1997  
1998 HTTP/1.1 206 Partial Content
1999 Content-Range: bytes 1048576-2097152/3145728
2000 Content-Type: video/mp4
2001  
2002 =head2 HTTP_MULTI_STATUS (207)
2003  
2004 See L<rfc 4918 on WebDAV|https://tools.ietf.org/html/rfc4918>
2005  
2006 This is returned predominantly under the WebDav protocol, when multiple operations occurred. For example:
2007  
2008 HTTP/1.1 207 Multi-Status
2009 Content-Type: application/xml; charset="utf-8"
2010 Content-Length: 637
2011  
2012 <d:multistatus xmlns:d="DAV:">
2013 <d:response>
2014 <d:href>/calendars/johndoe/home/132456762153245.ics</d:href>
2015 <d:propstat>
2016 <d:prop>
2017 <d:getetag>"xxxx-xxx"</d:getetag>
2018 </d:prop>
2019 <d:status>HTTP/1.1 200 OK</d:status>
2020 </d:propstat>
2021 </d:response>
2022 <d:response>
2023 <d:href>/calendars/johndoe/home/fancy-caldav-client-1234253678.ics</d:href>
2024 <d:propstat>
2025 <d:prop>
2026 <d:getetag>"5-12"</d:getetag>
2027 </d:prop>
2028 <d:status>HTTP/1.1 200 OK</d:status>
2029 </d:propstat>
2030 </d:response>
2031 </d:multistatus>
2032  
2033 =head2 HTTP_ALREADY_REPORTED (208)
2034  
2035 See L<rfc 5842, section 7.1 on WebDAV bindings|https://tools.ietf.org/html/rfc5842#section-7.1>
2036  
2037 This is returned predominantly under the WebDav protocol.
2038  
2039 =head2 HTTP_IM_USED (226)
2040  
2041 See L<rfc 3229 on Delta encoding|https://tools.ietf.org/html/rfc3229>
2042  
2043 C<IM> stands for C<Instance Manipulation>.
2044  
2045 This is an HTTP protocol extension used to indicate a diff performed and return only a fraction of the resource. This is especially true when the actual resource is large and it would be a waste of bandwidth to return the entire resource. For example:
2046  
2047 GET /foo.html HTTP/1.1
2048 Host: bar.example.net
2049 If-None-Match: "123xyz"
2050 A-IM: vcdiff, diffe, gzip
2051  
2052 Then, the server would reply something like:
2053  
2054 HTTP/1.1 226 IM Used
2055 ETag: "489uhw"
2056 IM: vcdiff
2057 Date: Tue, 25 Nov 1997 18:30:05 GMT
2058 Cache-Control: no-store, im, max-age=30
2059  
2060 See also the L<HTTP range request|https://tools.ietf.org/html/rfc7233> triggering a C<206 Partial Content> response.
2061  
2062 =head2 HTTP_MULTIPLE_CHOICES (300)
2063  
2064 See L<rfc 7231, section 6.4.1|https://tools.ietf.org/html/rfc7231#section-6.4.1> and L<rfc 5988|https://tools.ietf.org/html/rfc5988> for the C<Link> header.
2065  
2066 See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300>
2067  
2068 This is returned when there is a redirection with multiple choices possible. For example:
2069  
2070 HTTP/1.1 300 Multiple Choices
2071 Server: Apache/2.4
2072 Access-Control-Allow-Headers: Content-Type,User-Agent
2073 Access-Control-Allow-Origin: *
2074 Link: </foo> rel="alternate"
2075 Link: </bar> rel="alternate"
2076 Content-Type: text/html
2077 Location: /foo
2078  
2079 However, because there is no standard way to have the user choose, this response code is never used.
2080  
2081 =head2 HTTP_MOVED_PERMANENTLY (301)
2082  
2083 See L<rfc 7231, section 6.4.2|https://tools.ietf.org/html/rfc7231#section-6.4.2>
2084  
2085 This is returned to indicate the target resource can now be found at a different location and all pointers should be updated accordingly. For example:
2086  
2087 HTTP/1.1 301 Moved Permanently
2088 Server: Apache/2.4
2089 Content-Type: text/html; charset=utf-8
2090 Date: Mon, 18 Apr 2022 17:33:08 GMT
2091 Location: https://example.org/some/where/else.html
2092 Keep-Alive: timeout=15, max=98
2093 Accept-Ranges: bytes
2094 Via: Moz-Cache-zlb05
2095 Connection: Keep-Alive
2096 Content-Length: 212
2097  
2098 <!DOCTYPE html>
2099 <html><head>
2100 <title>301 Moved Permanently</title>
2101 </head><body>
2102 <h1>Moved Permanently</h1>
2103 <p>The document has moved <a href="https://example.org/some/where/else.html">here</a>.</p>
2104 </body></html>
2105  
2106 See also C<308 Permanent Redirect>
2107  
2108 =head2 HTTP_MOVED_TEMPORARILY (302)
2109  
2110 See L<rfc 7231, section 6.4.3|https://tools.ietf.org/html/rfc7231#section-6.4.3>
2111  
2112 This is returned to indicate the resource was found, but somewhere else. This is to be understood as a temporary change.
2113  
2114 The de facto standard, divergent from the original intent, is to point the client to a new location after a C<POST> request was performed. This is why the status code C<307> was created.
2115  
2116 See also C<307 Temporary Redirect>, which more formally tells the client to reformulate their request to the new location.
2117  
2118 See also C<303 See Other> for a formal implementation of aforementioned de facto standard, i.e. C<GET> new location after C<POST> request.
2119  
2120 =head2 HTTP_SEE_OTHER (303)
2121  
2122 See L<rfc 7231, section 6.4.4|https://tools.ietf.org/html/rfc7231#section-6.4.4>
2123  
2124 This is returned to indicate the result of processing the request can be found at another location. For example, after a C<POST> request, such as:
2125  
2126 HTTP/1.1 303 See Other
2127 Server: Apache/2.4
2128 Location: /worked/well
2129  
2130 It is considered better to redirect once request has been processed rather than returning the result immediately in the response body, because in the former case, this wil register a new entry in the client history whereas with the former, this would force the user to re-submit if the user did a back in history.
2131  
2132 =head2 HTTP_NOT_MODIFIED (304)
2133  
2134 See L<rfc 7232, section 4.1 on Conditional Request|https://tools.ietf.org/html/rfc7232#section-4.1>
2135  
2136 This is returned in response to a conditional C<GET> or C<POST> request with headers such as:
2137  
2138 =over 4
2139  
2140 =item L<If-Match|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match>
2141  
2142 =item L<If-None-Match|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match>
2143  
2144 =item L<If-Modified-Since|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since>
2145  
2146 =item L<If-Unmodified-Since|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since>
2147  
2148 =item L<If-Range|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Range>
2149  
2150 =back
2151  
2152 For example:
2153  
2154 GET /foo HTTP/1.1
2155 Accept: text/html
2156  
2157 Then, the server would reply something like:
2158  
2159 HTTP/1.1 200 Ok
2160 Content-Type: text/html
2161 ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"
2162  
2163 Later, the client would do another request, such as:
2164  
2165 GET /foo HTTP/1.1
2166 Accept: text/html
2167 If-None-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4"
2168  
2169 And if nothing changed, the server would return something like this:
2170  
2171 HTTP/1.1 304 Not Modified
2172 ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"
2173  
2174 =head2 HTTP_USE_PROXY (305)
2175  
2176 See L<rfc 7231, section 6.4.5|https://tools.ietf.org/html/rfc7231#section-6.4.5> and the L<rfc 2616, section 10.3.6 deprecating this status code|https://tools.ietf.org/html/rfc2616#section-10.3.6>
2177  
2178 This is returned to indicate to the client to submit the request again, using a proxy. For example:
2179  
2180 HTTP/1.1 305 Use Proxy
2181 Location: https://proxy.example.org:8080/
2182  
2183 This is deprecated and is not in use.
2184  
2185 =head2 306 Switch Proxy
2186  
2187 This is deprecated and now a reserved status code that was L<originally designed|https://lists.w3.org/Archives/Public/ietf-http-wg-old/1997MayAug/0373.html> to indicate to the client the need to change proxy, but was deemed ultimately a security risk. See the original L<rfc draft|https://datatracker.ietf.org/doc/html/draft-cohen-http-305-306-responses-00>
2188  
2189 For example:
2190  
2191 HTTP/1.1 306 Switch Proxy
2192 Set-Proxy: SET; proxyURI="https://proxy.example.org:8080/" scope="http://", seconds=100
2193  
2194 =head2 HTTP_TEMPORARY_REDIRECT (307)
2195  
2196 See L<rfc 2731, section 6.4.7|https://tools.ietf.org/html/rfc7231#section-6.4.7>
2197  
2198 This is returned to indicate the client to perform the request again at a different location. The difference with status code C<302> is that the client would redirect to the new location using a C<GET> method, whereas with the status code C<307>, they have to perform the same request.
2199  
2200 For example:
2201  
2202 HTTP/1.1 307 Temporary Redirect
2203 Server: Apache/2.4
2204 Location: https://example.org/some/where/else.html
2205  
2206 =head2 HTTP_PERMANENT_REDIRECT (308)
2207  
2208 See L<rfc 7538 on Permanent Redirect|https://tools.ietf.org/html/rfc7538>
2209  
2210 Similar to the status code C<307> and C<302>, the status code C<308> indicates to the client to perform the request again at a different location and that the location has changed permanently. This echoes the status code C<301>, except that the standard with C<301> is for clients to redirect using C<GET> method even if originally the method used was C<POST>. With the status code C<308>, the client must reproduce the request with the original method.
2211  
2212 For example:
2213  
2214 GET / HTTP/1.1
2215 Host: example.org
2216  
2217 Then, the server would respond something like:
2218  
2219 HTTP/1.1 308 Permanent Redirect
2220 Server: Apache/2.4
2221 Content-Type: text/html; charset=UTF-8
2222 Location: https://example.org/some/where/else.html
2223 Content-Length: 393
2224  
2225 <!DOCTYPE HTML>
2226 <html>
2227 <head>
2228 <title>Permanent Redirect</title>
2229 <meta http-equiv="refresh"
2230 content="0; url=https://example.org/some/where/else.html">
2231 </head>
2232 <body>
2233 <p>
2234 The document has been moved to
2235 <a href="https://example.org/some/where/else.html"
2236 >https://example.org/some/where/else.html</a>.
2237 </p>
2238 </body>
2239 </html>
2240  
2241 =head2 HTTP_BAD_REQUEST (400)
2242  
2243 See L<rfc 7231, section 6.5.1|https://tools.ietf.org/html/rfc7231#section-6.5.1>
2244  
2245 This is returned to indicate the client made a request the server could not interpret.
2246  
2247 This is generally used as a fallback client-error code when other mode detailed C<4xx> code are not suitable.
2248  
2249 =head2 HTTP_UNAUTHORIZED (401)
2250  
2251 See L<rfc 7235, section 3.1 on Authentication|https://tools.ietf.org/html/rfc7235#section-3.1>
2252  
2253 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401>
2254  
2255 This is returned to indicate to the client it must authenticate first before issuing the request.
2256  
2257 See also status code C<403 Forbidden> when client is outright forbidden from accessing the resource.
2258  
2259 For example:
2260  
2261 HTTP/1.1 401 Unauthorized
2262 WWW-Authenticate: Basic; realm="Secured area"
2263  
2264 or, for APIs:
2265  
2266 HTTP/1.1 401 Unauthorized
2267 WWW-Authenticate: Bearer
2268  
2269 or, combining both:
2270  
2271 HTTP/1.1 401 Unauthorized
2272 WWW-Authenticate: Basic; realm="Dev zone", Bearer
2273  
2274 which equates to:
2275  
2276 HTTP/1.1 401 Unauthorized
2277 WWW-Authenticate: Basic; realm="Dev zone"
2278 WWW-Authenticate: Bearer
2279  
2280 So, for example, a user C<aladdin> with password C<opensesame> would result in the following request:
2281  
2282 GET / HTTP/1.1
2283 Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
2284  
2285 See also L<Mozilla documentation on Authorization header|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization>
2286  
2287 =head2 HTTP_PAYMENT_REQUIRED (402)
2288  
2289 See L<rfc 7231, section 6.5.2|https://tools.ietf.org/html/rfc7231#section-6.5.2>
2290  
2291 This was originally designed to inform the client that the resource could only be accessed once payment was made, but is now reserved and its current use is left at the discretion of the site implementing it.
2292  
2293 =head2 HTTP_FORBIDDEN (403)
2294  
2295 See L<rfc 7231, section 6.5.3|https://tools.ietf.org/html/rfc7231#section-6.5.3>
2296  
2297 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403>
2298  
2299 This is returned to indicate the client is barred from accessing the resource.
2300  
2301 This is different from C<405 Method Not Allowed>, which is used when the client has proper permission to access the resource, but is using a method not allowed, such as using C<PUT> instead of C<GET> method.
2302  
2303 =head2 HTTP_NOT_FOUND (404)
2304  
2305 See L<rfc 7231, section 6.5.4|https://tools.ietf.org/html/rfc7231#section-6.5.4>
2306  
2307 See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404>
2308  
2309 This is returned to indicate the resource does not exist anymore.
2310  
2311 =head2 HTTP_METHOD_NOT_ALLOWED (405)
2312  
2313 See L<rfc 7231, section 6.5.5|https://tools.ietf.org/html/rfc7231#section-6.5.5>
2314  
2315 This is returned to indicate the client it used a L<method|https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods> not allowed, such as using C<PUT> instead of C<GET>. The server can point out the supported methods with the C<Allow> header, such as:
2316  
2317 HTTP/1.1 405 Method Not Allowed
2318 Content-Type: text/html
2319 Content-Length: 32
2320 Allow: GET, HEAD, OPTIONS, PUT
2321  
2322 <h1>405 Try another method!</h1>
2323  
2324 =head2 HTTP_NOT_ACCEPTABLE (406)
2325  
2326 See L<rfc 7231, section 6.5.6|https://tools.ietf.org/html/rfc7231#section-6.5.6>
2327  
2328 This is returned to the client to indicate its requirements are not supported and thus not acceptable. This is in response to L<Accept|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept>, L<Accept-Charset|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Charset>, L<Accept-Encoding|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding>, L<Accept-Language|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language> headers
2329  
2330 For example:
2331  
2332 GET /foo HTTP/1.1
2333 Accept: application/json
2334 Accept-Language: fr-FR,en-GB;q=0.8,fr;q=0.6,en;q=0.4,ja;q=0.2
2335  
2336 HTTP/1.1 406 Not Acceptable
2337 Server: Apache/2.4
2338 Content-Type: text/html
2339  
2340 <h1>Je ne gère pas le type application/json</h1>
2341  
2342  
2343 Then, the server would response something like:
2344  
2345 =head2 HTTP_PROXY_AUTHENTICATION_REQUIRED (407)
2346  
2347 See L<rfc 7235, section 3.2 on Authentication|https://tools.ietf.org/html/rfc7235#section-3.2>
2348  
2349 This is returned to indicate the proxy used requires authentication. This is similar to the status code C<401 Unauthorized>.
2350  
2351 =head2 HTTP_REQUEST_TIME_OUT (408)
2352  
2353 See L<rfc 7231, section 6.5.7|https://tools.ietf.org/html/rfc7231#section-6.5.7>
2354  
2355 This is returned to indicate the request took too long to be received and timed out. For example:
2356  
2357 HTTP/1.1 408 Request Timeout
2358 Connection: close
2359 Content-Type: text/plain
2360 Content-Length: 19
2361  
2362 Too slow! Try again
2363  
2364 =head2 HTTP_CONFLICT (409)
2365  
2366 See L<rfc 7231, section 6.5.8|https://tools.ietf.org/html/rfc7231#section-6.5.8>
2367  
2368 This is returned to indicate a request conflict with the current state of the target resource, such as uploading with C<PUT> a file older than the remote one.
2369  
2370 =head2 HTTP_GONE (410)
2371  
2372 See L<rfc 7231, section 6.5.9|https://tools.ietf.org/html/rfc7231#section-6.5.9>
2373  
2374 This is returned to indicate that the target resource is gone permanently. The subtle difference with the status code C<404> is that with C<404>, the resource may be only temporally unavailable whereas with C<410>, this is irremediable. For example:
2375  
2376 HTTP/1.1 410 Gone
2377 Server: Apache/2.4
2378 Content-Type: text/plain
2379 Content-Length: 30
2380  
2381 The resource has been removed.
2382  
2383 =head2 HTTP_LENGTH_REQUIRED (411)
2384  
2385 See L<rfc 7231, section 6.5.10|https://tools.ietf.org/html/rfc7231#section-6.5.10>
2386  
2387 This is returned when the C<Content-Length> header was not provided by the client and the server requires it to be present. Most servers can do without.
2388  
2389 =head2 HTTP_PRECONDITION_FAILED (412)
2390  
2391 See L<rfc 7232 on Conditional Request|https://tools.ietf.org/html/rfc7232>
2392  
2393 This is returned when some preconditions set by the client could not be met.
2394  
2395 For example:
2396  
2397 Issuing a C<PUT> request for a document if it does not already exist.
2398  
2399 PUT /foo/new-article.md HTTP/1.1
2400 Content-Type: text/markdown
2401 If-None-Match: *
2402  
2403 Update a document if it has not changed since last time (etag)
2404  
2405 PUT /foo/old-article.md HTTP/1.1
2406 If-Match: "1345-12315"
2407 Content-Type: text/markdown
2408  
2409 If those failed, it would return something like:
2410  
2411 HTTP/1.1 412 Precondition Failed
2412 Content-Type: text/plain
2413 Content-Length: 64
2414  
2415 The article you are tring to update has changed since last time.
2416  
2417 If one adds the C<Prefer> header, the servers will return the current state of the resource, thus saving a round of request with a C<GET>, such as:
2418  
2419 PUT /foo/old-article.md HTTP/1.1
2420 If-Match: "1345-12315"
2421 Content-Type: text/markdown
2422 Prefer: return=representation
2423  
2424 ### Article version 2.1
2425  
2426 Then, the server would respond something like:
2427  
2428 HTTP/1.1 412 Precondition Failed
2429 Content-Type: text/markdown
2430 Etag: "4444-12345"
2431 Vary: Prefer
2432  
2433 ### Article version 3.0
2434  
2435 See also L<rfc 7240 about the Prefer header field|https://tools.ietf.org/html/rfc7240> and L<rfc 8144, Section 3.2|https://tools.ietf.org/html/rfc8144#section-3.2> about the usage of C<Prefer: return=representation> with status code C<412>
2436  
2437 =head2 HTTP_REQUEST_ENTITY_TOO_LARGE (413)
2438  
2439 See L<rfc 7231, section 6.5.11|https://tools.ietf.org/html/rfc7231#section-6.5.11>
2440  
2441 This is returned when the body of the request is too large, such as when sending a file whose size has exceeded the maximum size limit.
2442  
2443 For example:
2444  
2445 HTTP/1.1 413 Payload Too Large
2446 Retry-After: 3600
2447 Content-Type: text/html
2448 Content-Length: 52
2449  
2450 <p>You exceeded your quota. Try again in an hour</p>
2451  
2452 See also L<rfc 7231, section 7.1.3|https://tools.ietf.org/html/rfc7231#section-7.1.3> on C<Retry-After> header field.
2453  
2454 See also C<507 Insufficient Storage>
2455  
2456 =head2 HTTP_PAYLOAD_TOO_LARGE (413)
2457  
2458 Same as previous. Used here for compatibility with HTTP::Status
2459  
2460 =head2 HTTP_REQUEST_URI_TOO_LARGE (414)
2461  
2462 See L<rfc 7231, section 6.5.12|https://tools.ietf.org/html/rfc7231#section-6.5.12>
2463  
2464 Although there is no official limit to the size of an URI, some servers may implement a limit and return this status code when the URI exceeds it. Usually, it is recommended not to exceed 2048 bytes for an URI.
2465  
2466 =head2 HTTP_UNSUPPORTED_MEDIA_TYPE (415)
2467  
2468 See L<rfc 7231, section 6.5.13|https://tools.ietf.org/html/rfc7231#section-6.5.13>
2469  
2470 This is returned when the server received a request body type it does not understand.
2471  
2472 This status code may be returned even if the C<Content-Type> header value is supported, because the server would still inspect the request body, such as with a broken C<JSON> payload.
2473  
2474 Usually, in those cases, the server would rather return C<422 Unprocessable Entity>
2475  
2476 =head2 HTTP_RANGE_NOT_SATISFIABLE (416)
2477  
2478 See L<rfc 7233, section 4.4 on Range Requests|https://tools.ietf.org/html/rfc7233#section-4.4>
2479  
2480 This is returned when the client made a range request it did not understand.
2481  
2482 Client can issue range request instead of downloading the entire file, which is helpful for large data.
2483  
2484 =head2 HTTP_REQUEST_RANGE_NOT_SATISFIABLE (416)
2485  
2486 Same as previous. Used here for compatibility with HTTP::Status
2487  
2488 =head2 HTTP_EXPECTATION_FAILED (417)
2489  
2490 See L<rfc 7231, section 6.5.14|https://tools.ietf.org/html/rfc7231#section-6.5.14>
2491  
2492 This is returned when the server received an C<Expect> header field value it did not understand.
2493  
2494 For example:
2495  
2496 PUT /some//big/file.mp4 HTTP/1.1
2497 Host: www.example.org
2498 Content-Type: video/mp4
2499 Content-Length: 778043392
2500 Expect: 100-continue
2501  
2502 Then, the server could respond with the following:
2503  
2504 HTTP/1.1 417 Expectation Failed
2505 Server: Apache/2.4
2506 Content-Type: text/plain
2507 Content-Length: 30
2508  
2509 We do not support 100-continue
2510  
2511 See also L<rfc 7231, section 5.1.1|https://tools.ietf.org/html/rfc7231#section-5.1.1> on the C<Expect> header.
2512  
2513 =head2 HTTP_I_AM_A_TEAPOT (418)
2514  
2515 See L<rfc 2324 on HTCPC/1.0 1-april|https://tools.ietf.org/html/rfc2324>
2516  
2517 This status code is not actually a real one, but one that was made by the IETF as an april-fools' joke, and it stuck. Attempts to remove it was met with L<strong resistance|https://save418.com/>.
2518  
2519 There has even been L<libraries developed|https://github.com/dkundel/htcpcp-delonghi> to implement the L<HTCPC protocol|https://github.com/HyperTextCoffeePot/HyperTextCoffeePot>.
2520  
2521 =head2 HTTP_I_AM_A_TEA_POT (418)
2522  
2523 Same as previous.
2524  
2525 =head2 HTTP_MISDIRECTED_REQUEST (421)
2526  
2527 See L<rfc 7540, section 9.1.2 on HTTP/2|https://tools.ietf.org/html/rfc7540#section-9.1.2>
2528  
2529 This is returned when the web server received a request that was not intended for him.
2530  
2531 For example:
2532  
2533 GET /contact.html HTTP/1.1
2534 Host: foo.example.org
2535  
2536 HTTP/1.1 421 Misdirected Request
2537 Content-Type: text/plain
2538 Content-Length: 27
2539  
2540 This host unsupported here.
2541  
2542 =head2 HTTP_UNPROCESSABLE_ENTITY (422)
2543  
2544 See L<rfc 4918, section 11.2|https://tools.ietf.org/html/rfc4918#section-11.2>
2545  
2546 This is returned when the web server understood the request, but deemed the body content to not be processable.
2547  
2548 For example:
2549  
2550 POST /new-article HTTP/1.1
2551 Content-Type: application/json
2552 Content-Length: 26
2553  
2554 { "title": "Hello world!"}
2555  
2556 Then, the web server could respond something like:
2557  
2558 HTTP/1.1 422 Unprocessable Entity
2559 Content-Type: application/problem+json
2560 Content-Length: 114
2561  
2562 {
2563 "type" : "https://example.org/errors/missing-property",
2564 "status": 422,
2565 "title": "Missing property: body"
2566 }
2567  
2568 =head2 HTTP_LOCKED (423)
2569  
2570 See L<rfc 4918 on WebDAV|https://tools.ietf.org/html/rfc4918>
2571  
2572 This is returned under the WebDav protocol when one tries to make change to a locked resource.
2573  
2574 =head2 HTTP_FAILED_DEPENDENCY (424)
2575  
2576 See L<rfc 4918 on WebDAV|https://tools.ietf.org/html/rfc4918>
2577  
2578 This is returned under the WebDav protocol when the processing of one of the resources failed.
2579  
2580 =head2 HTTP_TOO_EARLY (425)
2581  
2582 See L<rfc 8470, section 5.2 on Using Early Data in HTTP|https://tools.ietf.org/html/rfc8470#section-5.2>
2583  
2584 This predominantly occurs during the TLS handshake to notify the client to retry a bit later once the TLS connection is up.
2585  
2586 =head2 HTTP_NO_CODE (425)
2587  
2588 Same as previous. Used here for compatibility with HTTP::Status
2589  
2590 =head2 HTTP_UNORDERED_COLLECTION (425)
2591  
2592 Same as previous. Used here for compatibility with HTTP::Status
2593  
2594 =head2 HTTP_UPGRADE_REQUIRED (426)
2595  
2596 See L<rfc 7231, section 6.5.15|https://tools.ietf.org/html/rfc7231#section-6.5.15>
2597  
2598 This is returned to notify the client to use a newer version of the HTTP protocol.
2599  
2600 =head2 HTTP_PRECONDITION_REQUIRED (428)
2601  
2602 See L<rfc 6585, section 3 on Additional Codes|https://tools.ietf.org/html/rfc6585#section-3>
2603  
2604 This is used when the web server requires the client to use condition requests, such as:
2605  
2606 =over 4
2607  
2608 =item L<If-Match|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match>
2609  
2610 =item L<If-None-Match|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match>
2611  
2612 =item L<If-Modified-Since|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since>
2613  
2614 =item L<If-Unmodified-Since|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since>
2615  
2616 =item L<If-Range|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Range>
2617  
2618 =back
2619  
2620 =head2 HTTP_TOO_MANY_REQUESTS (429)
2621  
2622 See L<rfc 6585, section 4 on Additional Codes|https://tools.ietf.org/html/rfc6585#section-4>
2623  
2624 This is returned when the server needs to notify the client to slow down the number of requests. This is predominantly used for API, but not only.
2625  
2626 For example:
2627  
2628 HTTP/1.1 429 Too Many Requests
2629 Content-Type: text/plain
2630 Content-Length: 44
2631 Retry-After: 3600
2632  
2633 You exceeded the limit. Try again in an hour
2634  
2635 =head2 HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE (431)
2636  
2637 See L<rfc 6585, section 5 on Additional Codes|https://tools.ietf.org/html/rfc6585#section-5>
2638  
2639 This is returned when the client issued a request containing HTTP header fields that are too big in size. Most likely culprit are the HTTP cookies.
2640  
2641 =head2 HTTP_CONNECTION_CLOSED_WITHOUT_RESPONSE (444)
2642  
2643 This is a non-standard status code used by some web servers, such as nginx, to instruct it to close the connection without sending a response back to the client, predominantly to deny malicious or malformed requests.
2644  
2645 This status code is actually not seen by the client, but only appears in nginx log files.
2646  
2647 =head2 HTTP_UNAVAILABLE_FOR_LEGAL_REASONS (451)
2648  
2649 See L<rfc 7725 on Legal Obstacles|https://tools.ietf.org/html/rfc7725>
2650  
2651 This is returned when, for some legal reasons, the resource could not be served.
2652  
2653 This status code has been chosen on purpose, for its relation with the book L<Fahrenheit 451|https://en.wikipedia.org/wiki/Fahrenheit_451> from Ray Bradbury. In his book, the central theme is the censorship of literature. The book title itself "Fahrenheit 451" refers to the temperature at which paper ignites, i.e. 451 Fahrenheit or 232° Celsius.
2654  
2655 For example:
2656  
2657 HTTP/1.1 451 Unavailable For Legal Reasons
2658 Link: <https://example.org/legal>; rel="blocked-by"
2659 Content-Type text/plain
2660 Content-Length: 48
2661  
2662 You are prohibited from accessing this resource.
2663  
2664 =head2 HTTP_CLIENT_CLOSED_REQUEST (499)
2665  
2666 This is a non-standard status code used by some web servers, such as nginx, when the client has closed the connection while the web server was still processing the request.
2667  
2668 This status code is actually not seen by the client, but only appears in nginx log files.
2669  
2670 =head2 HTTP_INTERNAL_SERVER_ERROR (500)
2671  
2672 See L<rfc 7231, section 6.6.1|https://tools.ietf.org/html/rfc7231#section-6.6.1>
2673  
2674 This is returned when an internal malfunction due to some bug of general processing error.
2675  
2676 =head2 HTTP_NOT_IMPLEMENTED (501)
2677  
2678 See L<rfc 7231, section 6.6.2|https://tools.ietf.org/html/rfc7231#section-6.6.2>
2679  
2680 This is returned when the web server unexpectedly does not support certain features, although the request was itself acceptable.
2681  
2682 =head2 HTTP_BAD_GATEWAY (502)
2683  
2684 See L<rfc 7231, section 6.6.3|https://tools.ietf.org/html/rfc7231#section-6.6.3>
2685  
2686 This is returned by proxy servers when the original target server is not operating properly and to notify the client of this.
2687  
2688 =head2 HTTP_SERVICE_UNAVAILABLE (503)
2689  
2690 See L<rfc 7231, section 6.6.4|https://tools.ietf.org/html/rfc7231#section-6.6.4>
2691  
2692 This is returned when the web server is temporally incapable of processing the request, such as due to overload.
2693  
2694 For example:
2695  
2696 HTTP/1.1 503 Service Unavailable
2697 Content-Type text/plain
2698 Content-Length: 56
2699 Retry-After: 1800
2700  
2701 System overload! Give us some time to increase capacity.
2702  
2703 =head2 HTTP_GATEWAY_TIME_OUT (504)
2704  
2705 See L<rfc 7231, section 6.6.5|https://tools.ietf.org/html/rfc7231#section-6.6.5>
2706  
2707 This is returned by a proxy server when the upstream target server is not responding in a timely manner.
2708  
2709 =head2 HTTP_VERSION_NOT_SUPPORTED (505)
2710  
2711 See L<rfc 7231, section 6.6.6|https://tools.ietf.org/html/rfc7231#section-6.6.6>
2712  
2713 This is returned when the web server does not support the HTTP version submitted by the client.
2714  
2715 For example:
2716  
2717 GET / HTTP/4.0
2718 Host: www.example.org
2719  
2720 Then, the server would respond something like:
2721  
2722 HTTP/1.1 505 HTTP Version Not Supported
2723 Server: Apache/2.4
2724 Date: Mon, 18 Apr 2022 15:23:35 GMT
2725 Content-Type: text/plain
2726 Content-Length: 30
2727 Connection: close
2728  
2729 505 HTTP Version Not Supported
2730  
2731 =head2 HTTP_VARIANT_ALSO_VARIES (506)
2732  
2733 See L<rfc 2295 on Transparant Ngttn|https://tools.ietf.org/html/rfc2295>
2734  
2735 This is returned in the context of Transparent Content Negotiation when there is a server-side misconfiguration that leads the chosen variant itself to also engage in content negotiation, thus looping.
2736  
2737 For example:
2738  
2739 GET / HTTP/1.1
2740 Host: www.example.org
2741 Accept: text/html; image/png; text/*; q=0.9
2742 Accept-Language: en-GB; en
2743 Accept-Charset: UTF-8
2744 Accept-Encoding: gzip, deflate, br
2745  
2746 =head2 HTTP_INSUFFICIENT_STORAGE (507)
2747  
2748 See L<rfc 4918, section 11.5 on WebDAV|https://tools.ietf.org/html/rfc4918#section-11.5>
2749  
2750 This is returned in the context of WebDav protocol when a C<POST> or C<PUT> request leads to storing data, but the operations fails, because the resource is too large to fit on the remaining space on the server disk.
2751  
2752 =head2 HTTP_LOOP_DETECTED (508)
2753  
2754 See L<rfc 5842, section 7.2 on WebDAV bindings|https://tools.ietf.org/html/rfc5842#section-7.2>
2755  
2756 This is returned in the context of WebDav when the target resource is looping.
2757  
2758 =head2 HTTP_BANDWIDTH_LIMIT_EXCEEDED (509)
2759  
2760 This is returned by some web servers when the amount of bandwidth consumed exceeded the maximum possible.
2761  
2762 =head2 HTTP_NOT_EXTENDED (510)
2763  
2764 See L<rfc 2774, section 6 on Extension Framework|https://tools.ietf.org/html/rfc2774#section-6>
2765  
2766 This is returned by the web server who expected the client to use an extended http feature, but did not.
2767  
2768 This is not widely implemented.
2769  
2770 =head2 HTTP_NETWORK_AUTHENTICATION_REQUIRED (511)
2771  
2772 See L<rfc 6585, section 6.1 on Additional Codes|https://tools.ietf.org/html/rfc6585#section-6.1>
2773  
2774 This is returned by web server on private network to notify the client that a prior authentication is required to be able to browse the web. This is most likely used in location with private WiFi, such as lounges.
2775  
2776 =head2 HTTP_NETWORK_CONNECT_TIMEOUT_ERROR (599)
2777  
2778 This is returned by some proxy servers to signal a network connect timeout behind the proxy and the upstream target server.
2779  
2780 This is not part of the standard.
2781  
2782 =head1 THREAD-SAFETY
2783  
2784 This module is thread-safe for all operations, as it operates on per-object state and uses thread-safe external libraries.
2785  
2786 =head1 AUTHOR
2787  
2788 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
2789  
2790 =head2 SEE ALSO
2791  
2792 L<IANA HTTP codes list|http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml>, L<rfc7231|https://tools.ietf.org/html/rfc7231>
2793  
2794 L<HTTP::Promise>, L<HTTP::Promise::Request>, L<HTTP::Promise::Response>, L<HTTP::Promise::Message>, L<HTTP::Promise::Entity>, L<HTTP::Promise::Headers>, L<HTTP::Promise::Body>, L<HTTP::Promise::Body::Form>, L<HTTP::Promise::Body::Form::Data>, L<HTTP::Promise::Body::Form::Field>, L<HTTP::Promise::Status>, L<HTTP::Promise::MIME>, L<HTTP::Promise::Parser>, L<HTTP::Promise::IO>, L<HTTP::Promise::Stream>, L<HTTP::Promise::Exception>
2795  
2796 =head1 COPYRIGHT & LICENSE
2797  
2798 Copyright(c) 2022 DEGUEST Pte. Ltd.
2799  
2800 All rights reserved.
2801  
2802 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2803  
2804 =cut
2805