Apache2-API
view release on metacpan or search on metacpan
lib/Apache2/API/Status.pm view on Meta::CPAN
##----------------------------------------------------------------------------
## Apache2 API Framework - ~/lib/Apache2/API/Status.pm
## Version v0.2.1
## Copyright(c) 2025 DEGUEST Pte. Ltd.
## Author: Jacques Deguest <jack@deguest.jp>
## Created 2023/05/30
## Modified 2026/03/22
## All rights reserved
##
##
## This program is free software; you can redistribute it and/or modify it
## under the same terms as Perl itself.
##----------------------------------------------------------------------------
package Apache2::API::Status;
BEGIN
{
use strict;
use warnings;
warnings::register_categories( 'Apache2::API' );
use parent qw( Module::Generic );
use vars qw( $CODES $HTTP_CODES $MAP_LANG_SHORT $STATUS_TO_TYPE );
use Apache2::Const -compile => qw( :http );
use constant
{
HTTP_CONTINUE => 100,
HTTP_SWITCHING_PROTOCOLS => 101,
HTTP_PROCESSING => 102,
HTTP_EARLY_HINTS => 103,
HTTP_OK => 200,
HTTP_CREATED => 201,
HTTP_ACCEPTED => 202,
HTTP_NON_AUTHORITATIVE => 203,
HTTP_NO_CONTENT => 204,
HTTP_RESET_CONTENT => 205,
HTTP_PARTIAL_CONTENT => 206,
HTTP_MULTI_STATUS => 207,
HTTP_ALREADY_REPORTED => 208,
HTTP_IM_USED => 226,
HTTP_MULTIPLE_CHOICES => 300,
HTTP_MOVED_PERMANENTLY => 301,
HTTP_MOVED_TEMPORARILY => 302,
HTTP_SEE_OTHER => 303,
HTTP_NOT_MODIFIED => 304,
HTTP_USE_PROXY => 305,
HTTP_TEMPORARY_REDIRECT => 307,
HTTP_PERMANENT_REDIRECT => 308,
HTTP_BAD_REQUEST => 400,
HTTP_UNAUTHORIZED => 401,
HTTP_PAYMENT_REQUIRED => 402,
HTTP_FORBIDDEN => 403,
HTTP_NOT_FOUND => 404,
HTTP_METHOD_NOT_ALLOWED => 405,
HTTP_NOT_ACCEPTABLE => 406,
HTTP_PROXY_AUTHENTICATION_REQUIRED => 407,
HTTP_REQUEST_TIME_OUT => 408,
HTTP_CONFLICT => 409,
HTTP_GONE => 410,
HTTP_LENGTH_REQUIRED => 411,
HTTP_PRECONDITION_FAILED => 412,
HTTP_REQUEST_ENTITY_TOO_LARGE => 413,
# Compatibility with HTTP::Status
HTTP_PAYLOAD_TOO_LARGE => 413,
HTTP_REQUEST_URI_TOO_LARGE => 414,
HTTP_URI_TOO_LONG => 414,
HTTP_UNSUPPORTED_MEDIA_TYPE => 415,
HTTP_RANGE_NOT_SATISFIABLE => 416,
# Compatibility with HTTP::Status
HTTP_REQUEST_RANGE_NOT_SATISFIABLE => 416,
HTTP_EXPECTATION_FAILED => 417,
HTTP_I_AM_A_TEA_POT => 418,
# Compatibility with HTTP::Status
HTTP_I_AM_A_TEAPOT => 418,
HTTP_MISDIRECTED_REQUEST => 421,
HTTP_UNPROCESSABLE_ENTITY => 422,
HTTP_LOCKED => 423,
HTTP_FAILED_DEPENDENCY => 424,
HTTP_TOO_EARLY => 425,
# Compatibility with HTTP::Status
HTTP_NO_CODE => 425,
# Compatibility with HTTP::Status
HTTP_UNORDERED_COLLECTION => 425,
HTTP_UPGRADE_REQUIRED => 426,
HTTP_PRECONDITION_REQUIRED => 428,
HTTP_TOO_MANY_REQUESTS => 429,
HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE => 431,
HTTP_CONNECTION_CLOSED_WITHOUT_RESPONSE => 444,
HTTP_UNAVAILABLE_FOR_LEGAL_REASONS => 451,
HTTP_CLIENT_CLOSED_REQUEST => 499,
HTTP_INTERNAL_SERVER_ERROR => 500,
HTTP_NOT_IMPLEMENTED => 501,
HTTP_BAD_GATEWAY => 502,
HTTP_SERVICE_UNAVAILABLE => 503,
HTTP_GATEWAY_TIME_OUT => 504,
HTTP_VERSION_NOT_SUPPORTED => 505,
HTTP_VARIANT_ALSO_VARIES => 506,
HTTP_INSUFFICIENT_STORAGE => 507,
HTTP_LOOP_DETECTED => 508,
HTTP_BANDWIDTH_LIMIT_EXCEEDED => 509,
HTTP_NOT_EXTENDED => 510,
HTTP_NETWORK_AUTHENTICATION_REQUIRED => 511,
HTTP_NETWORK_CONNECT_TIMEOUT_ERROR => 599,
};
our @EXPORT_OK = qw(
HTTP_ACCEPTED HTTP_ALREADY_REPORTED HTTP_BAD_GATEWAY HTTP_BAD_REQUEST
HTTP_BANDWIDTH_LIMIT_EXCEEDED HTTP_CLIENT_CLOSED_REQUEST HTTP_CONFLICT
HTTP_CONNECTION_CLOSED_WITHOUT_RESPONSE HTTP_CONTINUE HTTP_CREATED
HTTP_EARLY_HINTS HTTP_EXPECTATION_FAILED HTTP_FAILED_DEPENDENCY
HTTP_FORBIDDEN HTTP_GATEWAY_TIME_OUT HTTP_GONE HTTP_IM_USED
HTTP_INSUFFICIENT_STORAGE HTTP_INTERNAL_SERVER_ERROR
HTTP_I_AM_A_TEAPOT HTTP_I_AM_A_TEA_POT HTTP_LENGTH_REQUIRED
HTTP_LOCKED HTTP_LOOP_DETECTED HTTP_METHOD_NOT_ALLOWED
lib/Apache2/API/Status.pm view on Meta::CPAN
HTTP_NOT_IMPLEMENTED HTTP_NOT_MODIFIED HTTP_NO_CODE HTTP_NO_CONTENT
HTTP_OK HTTP_PARTIAL_CONTENT HTTP_PAYLOAD_TOO_LARGE
HTTP_PAYMENT_REQUIRED HTTP_PERMANENT_REDIRECT HTTP_PRECONDITION_FAILED
HTTP_PRECONDITION_REQUIRED HTTP_PROCESSING
HTTP_PROXY_AUTHENTICATION_REQUIRED HTTP_RANGE_NOT_SATISFIABLE
HTTP_REQUEST_ENTITY_TOO_LARGE HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE
HTTP_REQUEST_RANGE_NOT_SATISFIABLE HTTP_REQUEST_TIME_OUT
HTTP_REQUEST_URI_TOO_LARGE HTTP_RESET_CONTENT HTTP_SEE_OTHER
HTTP_SERVICE_UNAVAILABLE HTTP_SWITCHING_PROTOCOLS
HTTP_TEMPORARY_REDIRECT HTTP_TOO_EARLY HTTP_TOO_MANY_REQUESTS
HTTP_UNAUTHORIZED HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
HTTP_UNORDERED_COLLECTION HTTP_UNPROCESSABLE_ENTITY
HTTP_UNSUPPORTED_MEDIA_TYPE HTTP_UPGRADE_REQUIRED HTTP_URI_TOO_LONG
HTTP_USE_PROXY HTTP_VARIANT_ALSO_VARIES HTTP_VERSION_NOT_SUPPORTED
);
our %EXPORT_TAGS = (
all => [@EXPORT_OK],
common => [qw( HTTP_NETWORK_AUTHENTICATION_REQUIRED HTTP_FORBIDDEN HTTP_NOT_FOUND HTTP_OK HTTP_TEMPORARY_REDIRECT HTTP_INTERNAL_SERVER_ERROR )],
);
our $VERSION = 'v0.2.1';
};
use strict;
use warnings;
use utf8;
# Ref:
# <https://datatracker.ietf.org/doc/html/rfc7231#section-8.2>
# <http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml>
our $CODES =
{
# Info 1xx
100 => Apache2::Const::HTTP_CONTINUE,
101 => Apache2::Const::HTTP_SWITCHING_PROTOCOLS,
102 => Apache2::Const::HTTP_PROCESSING,
# Success 2xx
200 => Apache2::Const::HTTP_OK,
201 => Apache2::Const::HTTP_CREATED,
202 => Apache2::Const::HTTP_ACCEPTED,
203 => Apache2::Const::HTTP_NON_AUTHORITATIVE,
204 => Apache2::Const::HTTP_NO_CONTENT,
205 => Apache2::Const::HTTP_RESET_CONTENT,
206 => Apache2::Const::HTTP_PARTIAL_CONTENT,
207 => Apache2::Const::HTTP_MULTI_STATUS,
208 => Apache2::Const::HTTP_ALREADY_REPORTED,
226 => Apache2::Const::HTTP_IM_USED,
# Redirect 3xx
300 => Apache2::Const::HTTP_MULTIPLE_CHOICES,
301 => Apache2::Const::HTTP_MOVED_PERMANENTLY,
302 => Apache2::Const::HTTP_MOVED_TEMPORARILY,
303 => Apache2::Const::HTTP_SEE_OTHER,
304 => Apache2::Const::HTTP_NOT_MODIFIED,
305 => Apache2::Const::HTTP_USE_PROXY,
307 => Apache2::Const::HTTP_TEMPORARY_REDIRECT,
308 => Apache2::Const::HTTP_PERMANENT_REDIRECT,
# Client error 4xx
400 => Apache2::Const::HTTP_BAD_REQUEST,
401 => Apache2::Const::HTTP_UNAUTHORIZED,
402 => Apache2::Const::HTTP_PAYMENT_REQUIRED,
403 => Apache2::Const::HTTP_FORBIDDEN,
404 => Apache2::Const::HTTP_NOT_FOUND,
405 => Apache2::Const::HTTP_METHOD_NOT_ALLOWED,
406 => Apache2::Const::HTTP_NOT_ACCEPTABLE,
407 => Apache2::Const::HTTP_PROXY_AUTHENTICATION_REQUIRED,
408 => Apache2::Const::HTTP_REQUEST_TIME_OUT,
409 => Apache2::Const::HTTP_CONFLICT,
410 => Apache2::Const::HTTP_GONE,
411 => Apache2::Const::HTTP_LENGTH_REQUIRED,
412 => Apache2::Const::HTTP_PRECONDITION_FAILED,
413 => Apache2::Const::HTTP_REQUEST_ENTITY_TOO_LARGE,
414 => Apache2::Const::HTTP_REQUEST_URI_TOO_LARGE,
415 => Apache2::Const::HTTP_UNSUPPORTED_MEDIA_TYPE,
416 => Apache2::Const::HTTP_RANGE_NOT_SATISFIABLE,
417 => Apache2::Const::HTTP_EXPECTATION_FAILED,
# 421 => Apache2::Const::HTTP_MISDIRECTED_REQUEST,
#W WebDAV
422 => Apache2::Const::HTTP_UNPROCESSABLE_ENTITY,
# WebDAV
423 => Apache2::Const::HTTP_LOCKED,
# WebDAV
424 => Apache2::Const::HTTP_FAILED_DEPENDENCY,
426 => Apache2::Const::HTTP_UPGRADE_REQUIRED,
428 => Apache2::Const::HTTP_PRECONDITION_REQUIRED,
429 => Apache2::Const::HTTP_TOO_MANY_REQUESTS,
431 => Apache2::Const::HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE,
# 451 => Apache2::Const::HTTP_UNAVAILABLE_FOR_LEGAL_REASONS,
# Server error 5xx
500 => Apache2::Const::HTTP_INTERNAL_SERVER_ERROR,
501 => Apache2::Const::HTTP_NOT_IMPLEMENTED,
502 => Apache2::Const::HTTP_BAD_GATEWAY,
503 => Apache2::Const::HTTP_SERVICE_UNAVAILABLE,
504 => Apache2::Const::HTTP_GATEWAY_TIME_OUT,
506 => Apache2::Const::HTTP_VARIANT_ALSO_VARIES,
# WebDAV
507 => Apache2::Const::HTTP_INSUFFICIENT_STORAGE,
508 => Apache2::Const::HTTP_LOOP_DETECTED,
510 => Apache2::Const::HTTP_NOT_EXTENDED,
511 => Apache2::Const::HTTP_NETWORK_AUTHENTICATION_REQUIRED,
};
our $HTTP_CODES =
{
cs_CZ => {
100 => "PokraÄovat",
101 => "PÅepÃnánà protokolů",
102 => "Zpracovává se",
103 => "PÅedbÄžné pokyny",
200 => "OK",
201 => "VytvoÅeno",
202 => "PÅijato",
203 => "Neautoritativnà informace",
204 => "Bez obsahu",
205 => "Obnovit obsah",
206 => "ÄásteÄný obsah",
207 => "VÃce stavů",
208 => "Již nahlášeno",
226 => "IM použito",
300 => "VÃce možnostÃ",
301 => "Trvale pÅesunuto!",
302 => "DoÄasnÄ pÅesunuto!",
303 => "Viz jiné",
304 => "NezmÄnÄno",
305 => "PoužÃt proxy",
307 => "DoÄasné pÅesmÄrovánÃ!",
308 => "Trvalé pÅesmÄrovánÃ!",
400 => "Chybný požadavek!",
401 => "Požadováno ovÄÅenÃ!",
402 => "Platba vyžadována!",
403 => "PÅÃstup odmÃtnut!",
404 => "Objekt nenalezen!",
405 => "Metoda nepovolena!",
406 => "NepÅijatelné!",
407 => "Požadováno ovÄÅenà proxy!",
408 => "VyprÅ¡el Äasový limit požadavku!",
409 => "Konflikt!",
410 => "Zdroj již nenà dále dostupný!",
411 => "Chybná hlaviÄka Content-Length!",
412 => "PÅedbÄžná podmÃnka nesplnÄna!",
413 => "Požadovaná entita je pÅÃliÅ¡ velká!",
414 => "Požadované URI je pÅÃliÅ¡ dlouhé!",
415 => "Nepodporovaný typ média!",
416 => "Požadovanému rozsahu nelze vyhovÄt!",
417 => "OÄekávánà nesplnÄno!",
418 => "Jsem ÄajnÃk",
421 => "ChybnÄ smÄrovaný požadavek",
422 => "Nezpracovatelná entita!",
423 => "Zámek zdroje!",
424 => "SelhávajÃcà závislost!",
425 => "PÅÃliÅ¡ brzy!",
426 => "Vyžadována aktualizace!",
428 => "Vyžadována pÅedpodmÃnka",
429 => "PÅÃliÅ¡ mnoho požadavků!",
431 => "HlaviÄky požadavku pÅÃliÅ¡ velké!",
444 => "PÅipojenà ukonÄeno bez odpovÄdi",
451 => "Nedostupné z právnÃch důvodů!",
499 => "Požadavek ukonÄen klientem",
500 => "Chyba serveru!",
501 => "Nelze zpracovat požadavek!",
502 => "Chybná brána!",
503 => "Služba nenà dostupná!",
504 => "VyprÅ¡el Äas brány!",
505 => "Nepodporovaná verze HTTP",
506 => "Varianta rovnÄž variuje!",
507 => "Nedostatek úložného prostoru!",
508 => "ZjiÅ¡tÄna smyÄka!",
509 => "PÅekroÄeno omezenà šÃÅky pásma",
510 => "NerozÅ¡ÃÅeno",
511 => "Vyžadováno sÃÅ¥ové ovÄÅenÃ",
599 => "Chyba Äasového limitu sÃÅ¥ového pÅipojenÃ",
},
# Ref: <https://developer.mozilla.org/de/docs/Web/HTTP/Status/100>
# <https://www.dotcom-monitor.com/wiki/de/knowledge-base/http-status-codes/>
de_DE => {
100 => "Weiter",
101 => "Protokolle wechseln",
102 => "Verarbeitung",
103 => "Frühe Hinweise",
200 => "OK",
201 => "Erstellt",
202 => "Akzeptiert",
203 => "Nicht autorisierende Informationen",
204 => "Kein Inhalt",
205 => "Inhalt zurücksetzen",
206 => "Teilinhalt",
207 => "Multi-Status",
208 => "Bereits gemeldet",
226 => "IM verwendet",
300 => "Mehrfachauswahlmöglichkeiten",
301 => "Dauerhaft verschoben!",
302 => "Vorübergehend verschoben!",
303 => "Andere sehen",
304 => "Nicht geändert",
305 => "Proxy verwenden",
307 => "Vorübergehende Umleitung!",
308 => "Dauerhafte Umleitung!",
400 => "Fehlerhafte Anfrage!",
401 => "Authentifizierung erforderlich!",
402 => "Zahlung erforderlich!",
403 => "Zugriff verweigert!",
404 => "Objekt nicht gefunden!",
405 => "Methode nicht erlaubt!",
406 => "Nicht akzeptabel!",
407 => "Proxy-Authentifizierung erforderlich!",
408 => "Zeitlimit überschritten!",
409 => "Konflikt!",
410 => "Objekt nicht mehr verfügbar!",
411 => "Content-Length-Angabe fehlerhaft!",
412 => "Vorbedingung nicht erfüllt!",
413 => "Ãbergebene Daten zu groÃ!",
414 => "Ãbergebener URI zu lang!",
415 => "Nicht unterstützter Medientyp!",
416 => "Bereich nicht erfüllbar!",
417 => "Erwartung fehlgeschlagen!",
418 => "Ich bin eine Teekanne",
421 => "Fehlgeleitete Anfrage",
422 => "Unverarbeitbare Entität!",
423 => "Ressource gesperrt!",
424 => "Fehlende Abhängigkeit!",
425 => "Zu früh!",
426 => "Upgrade erforderlich!",
428 => "Vorbedingung erforderlich",
429 => "Zu viele Anfragen!",
431 => "Anfrage-Header zu groÃ!",
444 => "Verbindung ohne Antwort geschlossen",
451 => "Aus rechtlichen Gründen nicht verfügbar!",
499 => "Client die Verbindung schlieÃt",
500 => "Serverfehler!",
501 => "Anfrage nicht ausführbar!",
502 => "Fehlerhaftes Gateway!",
503 => "Dienst nicht verfügbar!",
504 => "Gateway-Zeitüberschreitung!",
505 => "HTTP-Version nicht unterstützt",
506 => "Variante variiert ebenfalls!",
507 => "Unzureichender Speicherplatz!",
508 => "Endlosschleife erkannt!",
509 => "Bandbreitenlimit überschritten",
510 => "Nicht erweitert",
511 => "Netzwerkauthentifizierung erforderlich",
599 => "Timeout-Fehler bei Netzwerkverbindung",
},
en_GB => {
100 => "Continue",
101 => "Switching Protocols",
102 => "Processing",
103 => "Early Hints",
200 => "OK",
201 => "Created",
202 => "Accepted",
203 => "Non-authoritative Information",
204 => "No Content",
205 => "Reset Content",
206 => "Partial Content",
207 => "Multi-Status",
208 => "Already Reported",
226 => "IM Used",
300 => "Multiple Choices",
301 => "Moved permanently!",
302 => "Found (temporary redirect)!",
303 => "See Other",
304 => "Not Modified",
305 => "Use Proxy",
307 => "Temporary redirect!",
308 => "Permanent redirect!",
400 => "Bad request!",
401 => "Authentication required!",
402 => "Payment required!",
403 => "Access forbidden!",
404 => "Object not found!",
405 => "Method not allowed!",
406 => "Not acceptable!",
407 => "Proxy authentication required!",
408 => "Request time-out!",
409 => "Conflict!",
410 => "Resource is no longer available!",
411 => "Bad Content-Length!",
412 => "Precondition failed!",
413 => "Request entity too large!",
414 => "Submitted URI too long!",
415 => "Unsupported media type!",
416 => "Range not satisfiable!",
417 => "Expectation failed!",
# Humour: April's fool
# <https://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol>
418 => "I'm a teapot",
421 => "Misdirected Request",
422 => "Unprocessable entity!",
423 => "Resource locked!",
424 => "Failed dependency!",
425 => "Too early!",
426 => "Upgrade Required!",
428 => "Precondition Required",
429 => "Too many requests!",
431 => "Request Headers Too Large!",
444 => "Connection Closed Without Response",
451 => "Unavailable for legal reasons!",
499 => "Client Closed Request",
500 => "Server error!",
501 => "Cannot process request!",
502 => "Bad Gateway!",
503 => "Service unavailable!",
504 => "Gateway timeout!",
505 => "HTTP Version Not Supported",
506 => "Variant also varies!",
507 => "Insufficient storage!",
508 => "Loop detected!",
509 => "Bandwidth Limit Exceeded",
510 => "Not Extended",
511 => "Network Authentication Required",
599 => "Network Connect Timeout Error",
},
es_ES => {
100 => "Continuar",
101 => "Cambio de protocolos",
102 => "Procesando",
103 => "Pistas tempranas",
200 => "OK",
201 => "Creado",
202 => "Aceptado",
203 => "Información no autoritativa",
204 => "Sin contenido",
205 => "Restablecer contenido",
206 => "Contenido parcial",
207 => "Multi-estado",
208 => "Ya informado",
226 => "IM usado",
300 => "Múltiples opciones",
301 => "¡Movido permanentemente!",
302 => "¡Encontrado (redirección temporal)!",
303 => "Ver otros",
304 => "No modificado",
305 => "Usar proxy",
307 => "¡Redirección temporal!",
308 => "¡Redirección permanente!",
400 => "¡Petición errónea!",
401 => "¡Autenticación requerida!",
402 => "¡Pago requerido!",
403 => "¡Acceso prohibido!",
404 => "¡Objeto no localizado!",
405 => "¡Método no permitido!",
406 => "¡No aceptable!",
407 => "¡Se requiere autenticación de proxy!",
408 => "¡Tiempo de espera excedido!",
409 => "¡Conflicto!",
410 => "¡El recurso ya no está disponible!",
411 => "¡Error en la longitud del contenido!",
412 => "¡Fallo de precondición!",
413 => "¡La entidad solicitada es demasiado grande!",
414 => "¡El URI enviado es demasiado largo!",
415 => "¡Tipo de medio no soportado!",
416 => "Rango no satisfacible!",
417 => "Expectativa no satisfecha!",
418 => "Soy una tetera",
421 => "Solicitud mal dirigida",
422 => "¡Entidad no procesable!",
423 => "Recurso bloqueado!",
424 => "¡Dependencia fallida!",
425 => "¡Demasiado pronto!",
426 => "¡Actualización requerida!",
428 => "Se requiere condición previa",
429 => "¡Demasiadas solicitudes!",
431 => "¡Encabezados de solicitud demasiado grandes!",
444 => "Conexión cerrada sin respuesta",
451 => "¡No disponible por razones legales!",
499 => "Solicitud cerrada por el cliente",
500 => "¡Error del servidor!",
501 => "¡No se puede procesar la petición!",
502 => "¡Puerta de enlace errónea!",
503 => "¡Servicio no disponible!",
504 => "¡Tiempo de espera de la pasarela agotado!",
505 => "Versión HTTP no soportada",
506 => "La variante también varÃa",
507 => "¡Almacenamiento insuficiente!",
508 => "¡Bucle detectado!",
509 => "LÃmite de ancho de banda excedido",
510 => "No extendido",
511 => "Autenticación de red requerida",
599 => "Error de tiempo de espera de conexión de red",
},
fr_FR => {
100 => "Continuer",
101 => "Changement de protocole",
102 => "En traitement",
103 => "Premiers indices",
200 => "OK",
201 => "Créé",
202 => "Accepté",
203 => "Information non certifiée",
204 => "Pas de contenu",
205 => "Contenu réinitialisé",
206 => "Contenu partiel",
207 => "Multi-Status",
208 => "Déjà rapporté",
226 => "IM utilisé",
300 => "Choix multiples",
301 => "Déplacé définitivement !",
302 => "Trouvé (redirection temporaire) !",
303 => "Voir ailleurs",
304 => "Non modifié",
305 => "Utiliser le proxy",
307 => "Redirection temporaire !",
308 => "Redirection permanente !",
400 => "Requête incorrecte !",
401 => "Authentification requise !",
402 => "Paiement requis !",
403 => "Accès interdit!",
404 => "Objet non trouvé!",
405 => "Méthode interdite!",
406 => "Non acceptable !",
407 => "Authentification proxy requise !",
408 => "Délai dâattente de la requête dépassé !",
409 => "Conflit !",
410 => "Cette ressource n'existe plus!",
411 => "Longueur du contenu invalide!",
412 => "Ãchec de la précondition !",
413 => "Corps de requête trop volumineux !",
414 => "LâURI transmis est trop long !",
415 => "Type de média non pris en charge !",
416 => "Plage de requête non satisfaisable !",
417 => "Attente non satisfaite !",
# Humour; poisson d'avril
# <https://fr.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol>
418 => "Je suis une théière",
421 => "Requête mal dirigée",
422 => "Entité non traitable !",
423 => "Ressource verrouillée !",
424 => "Dépendance défaillante !",
425 => "Trop tôt !",
426 => "Mise à niveau requise !",
428 => "Précondition requise",
429 => "Trop de requêtes !",
431 => "En-têtes de requête trop grands !",
444 => "Connexion clôturée sans réponse",
451 => "Indisponible pour des raisons juridiques !",
499 => "Le client a terminé la requête",
500 => "Erreur du serveur!",
501 => "La requête ne peut pas être traitée!",
502 => "Mauvaise passerelle !",
503 => "Service inaccessible!",
504 => "Délai dâattente de la passerelle dépassé !",
505 => "Version HTTP non supportée",
506 => "La variante varie également !",
507 => "Espace de stockage insuffisant !",
508 => "Boucle détectée !",
509 => "Limite de bande passante dépassée",
510 => "Pas étendu",
511 => "Authentification réseau requise",
599 => "Délai dâattente de la connexion réseau dépassé",
},
ga_IE => {
100 => "Lean ar aghaidh",
101 => "Prótacail á n-athrú",
102 => "à phróiseáil",
103 => "Leideanna luatha",
200 => "OK",
201 => "Cruthaithe",
202 => "Glactha",
203 => "Eolas neamhúdarásach",
204 => "Gan ábhar",
205 => "Ãbhar athshocraithe",
206 => "Ãbhar páirteach",
207 => "Il-stádas",
208 => "Tuairiscithe cheana",
226 => "IM in úsáid",
300 => "Ilroghanna",
301 => "Bogtha go buan!",
302 => "AimsÃodh (atreorú sealadach)!",
303 => "Féach eile",
304 => "Gan athrú",
305 => "Ãsáid seachfhreastalaÃ",
307 => "Atreorú sealadach!",
308 => "Atreorú buan!",
400 => "Iarratas mÃcheart!",
401 => "Is gá fÃordheimhniú!",
402 => "ÃocaÃocht de dhÃth!",
403 => "Rochtain neamhcheadaithe!",
404 => "Aidhm ar iarraidh!",
405 => "Modh neamhcheadaithe!",
406 => "Neamhghlactha!",
407 => "FÃordheimhniú seachfhreastalaà de dhÃth!",
408 => "Iarratas thar am!",
409 => "Coinbhleacht!",
410 => "Acmhainn imithe!",
411 => "Content-Length mÃcheart!",
412 => "Theip ar réamhchoinnÃoll!",
413 => "Eintiteas an iarratais ró-mhór!",
414 => "URI ró-fhada cuirthe isteach!",
415 => "Cineál meán gan tacaÃocht!",
416 => "Raon nach féidir a shásamh!",
417 => "Theip an ionchas!",
418 => "Is taephota mé",
421 => "Iarratas mÃ-treoraithe",
422 => "Aonad do-dhéanta a phróiseáil!",
423 => "Acmhainn faoi ghlas!",
424 => "Spleáchas teipthe!",
425 => "Ró-luath!",
426 => "Uasghrádú riachtanach!",
428 => "RéamhchoinnÃoll riachtanach",
429 => "An iomarca iarrataÃ!",
431 => "Ceannteidil iarratais ró-mhór!",
444 => "Ceangal dúnta gan freagra",
451 => "NÃl ar fáil ar chúiseanna dlÃ!",
499 => "Iarratas dúnta ag an gcliant",
500 => "Earráid fhreastalaÃ!",
501 => "Nà féidir an t-iarratas a phróiseáil!",
502 => "Geata mÃcheart!",
503 => "SeirbhÃs doúsáidte!",
504 => "Teorainn ama geata imithe thar fóir!",
505 => "Leagan HTTP gan tacaÃocht",
506 => "Athróg ag athrú freisin!",
507 => "Stóráil neamhleor!",
508 => "Lúb aithnithe!",
509 => "Teorainn bandaleithid sáraithe",
510 => "Gan leathnú",
511 => "FÃordheimhniú lÃonra riachtanach",
599 => "Earráid ama-theorann ceangail lÃonra",
},
it_IT => {
100 => "Continua",
101 => "Cambio di protocollo",
102 => "Elaborazione in corso",
103 => "Suggerimenti iniziali",
200 => "OK",
201 => "Creato",
202 => "Accettato",
203 => "Informazioni non autorevoli",
204 => "Nessun contenuto",
205 => "Reimposta contenuto",
206 => "Contenuto parziale",
207 => "Multi-stato",
208 => "Già segnalato",
226 => "IM utilizzato",
300 => "Scelte multiple",
301 => "Spostato definitivamente!",
302 => "Trovato (reindirizzamento temporaneo)!",
303 => "Vedi altro",
304 => "Non modificato",
305 => "Usa proxy",
307 => "Reindirizzamento temporaneo!",
308 => "Reindirizzamento permanente!",
400 => "Richiesta non valida!",
401 => "Autenticazione richiesta!",
402 => "Ã richiesto il pagamento!",
403 => "Accesso negato!",
404 => "Oggetto non trovato!",
405 => "Metodo non consentito!",
406 => "Non accettabile!",
407 => "Autenticazione proxy richiesta!",
408 => "Time-out della richiesta!",
409 => "Conflitto!",
410 => "La risorsa non è più disponibile!",
411 => "Campo Content-Length non valido!",
412 => "Precondizione non soddisfatta!",
413 => "Entità della richiesta troppo grande!",
414 => "URI troppo lungo!",
415 => "Tipo di media non supportato!",
416 => "Intervallo non soddisfacibile!",
417 => "Expectation fallita!",
418 => "Sono una teiera",
421 => "Richiesta mal indirizzata",
422 => "Entità non elaborabile!",
423 => "Risorsa bloccata!",
424 => "Dipendenza non soddisfatta!",
425 => "Troppo presto!",
426 => "Aggiornamento richiesto!",
428 => "Precondizione richiesta",
429 => "Troppe richieste!",
431 => "Intestazioni di richiesta troppo grandi!",
444 => "Connessione chiusa senza risposta",
451 => "Non disponibile per motivi legali!",
499 => "Richiesta chiusa dal client",
500 => "Errore del server!",
501 => "La richiesta non può essere soddisfatta!",
502 => "Gateway errato!",
503 => "Servizio non disponibile!",
504 => "Timeout del gateway!",
505 => "Versione HTTP non supportata",
506 => "La variante varia anchâessa!",
507 => "Spazio di archiviazione insufficiente!",
508 => "Rilevato loop!",
509 => "Limite di banda superato",
510 => "Non esteso",
511 => "Autenticazione di rete richiesta",
599 => "Errore di timeout della connessione di rete",
},
ja_JP => {
100 => "ç¶ç¶",
101 => "ãããã³ã«åæ¿",
102 => "å¦çä¸",
103 => "æ©æã®ãã³ã",
200 => "æå",
201 => "使å®äº",
202 => "åç",
203 => "ä¿¡é ¼ã§ããªãæ
å ±",
204 => "å
容ãªã",
205 => "å
容ããªã»ãã",
206 => "é¨åçå
容",
207 => "è¤æ°ã®ã¹ãã¼ã¿ã¹",
208 => "æ¢ã«å ±å",
226 => "IM使ç¨",
300 => "è¤æ°ã®é¸æ",
301 => "æä¹
çã«ç§»åãã¾ããï¼",
302 => "䏿çã«ç§»åãã¾ããï¼",
303 => "ä»ãåç
§ãã",
304 => "æªæ´æ°",
305 => "ãããã·ã使ç¨ãã",
307 => "䏿çãªãªãã¤ã¬ã¯ãï¼",
308 => "æä¹
çãªãªãã¤ã¬ã¯ãï¼",
400 => "䏿£ãªãªã¯ã¨ã¹ãï¼",
401 => "èªè¨¼ãå¿
è¦ã§ãï¼",
402 => "ãæ¯æããå¿
è¦ã§ãï¼",
403 => "ã¢ã¯ã»ã¹æå¦ï¼",
404 => "æªæ¤åºï¼",
405 => "許å¯ããã¦ããªãã¡ã½ããï¼",
406 => "åçã§ãã¾ããï¼",
407 => "ãããã·èªè¨¼ãå¿
è¦ã§ãï¼",
408 => "ãªã¯ã¨ã¹ãã¿ã¤ã ã¢ã¦ãï¼",
409 => "ç«¶åãçºçãã¾ããï¼",
410 => "ãªã½ã¼ã¹ã¯ãã使ããªãï¼",
411 => "䏿£ãªContent-Lengthï¼",
412 => "åææ¡ä»¶ãæºããã¦ãã¾ããï¼",
413 => "ãã¤ãã¼ãã大ããããï¼",
414 => "URI ãé·ããã¾ãï¼",
415 => "ãµãã¼ãããã¦ããªãã¡ãã£ã¢ã¿ã¤ãï¼",
416 => "è¦æ±ç¯å²ã¯æºããã¾ããï¼",
417 => "Expect ãããã¼ãæºããã¾ããï¼",
418 => "ç§ã¯ãã£ã¼ããã",
421 => "誤ã£ãå®å
ã¸ã®ãªã¯ã¨ã¹ã",
422 => "å¦çã§ããªãã¨ã³ãã£ãã£ï¼",
423 => "ãªã½ã¼ã¹ãããã¯ããã¦ãã¾ãï¼",
424 => "ä¾åé¢ä¿ã®å¤±æï¼",
425 => "ææå°æ©ï¼",
426 => "ã¢ããã°ã¬ã¼ããå¿
è¦ï¼",
428 => "åææ¡ä»¶ãå¿
è¦ã§ã",
429 => "ãªã¯ã¨ã¹ããå¤ããã¾ãï¼",
431 => "ãªã¯ã¨ã¹ããããã大ããããï¼",
444 => "å¿çãªãã§æ¥ç¶ãéãããã¾ãã",
451 => "æ³ççç±ã«ããå©ç¨ã§ãã¾ããï¼",
499 => "ã¯ã©ã¤ã¢ã³ãã«ãããªã¯ã¨ã¹ãã®çµäº",
500 => "ãµã¼ãå
é¨ã¨ã©ã¼ï¼",
501 => "ãªã¯ã¨ã¹ããå¦çã§ããªãï¼",
502 => "䏿£ãªã²ã¼ãã¦ã§ã¤ï¼",
503 => "ãµã¼ãã¹å©ç¨ä¸å¯ï¼",
504 => "ã²ã¼ãã¦ã§ã¤ã¿ã¤ã ã¢ã¦ãï¼",
505 => "ãµãã¼ããã¦ããªãHTTPãã¼ã¸ã§ã³",
506 => "ããªã¢ã³ããå¤åãã¾ãï¼",
507 => "ã¹ãã¬ã¼ã¸ä¸è¶³ï¼",
508 => "ã«ã¼ããæ¤åºãã¾ããï¼",
509 => "帯åå¹
å¶éè¶
é",
510 => "æ¡å¼µã§ããªã",
511 => "ãããã¯ã¼ã¯èªè¨¼ãå¿
è¦",
599 => "ãããã¯ã¼ã¯æ¥ç¶ã¿ã¤ã ã¢ã¦ãã¨ã©ã¼",
},
# Ref: <https://developer.mozilla.org/ko/docs/Web/HTTP/Status>
# <https://ko.wikipedia.org/wiki/HTTP_%EC%83%81%ED%83%9C_%EC%BD%94%EB%93%9C>
# <http://wiki.hash.kr/index.php/HTTP>
ko_KR => {
100 => "ê³ì",
101 => "ì¤ìì¹ íë¡í ì½",
102 => "ì²ë¦¬ ì¤",
103 => "ì´ê¸° íí¸",
200 => "íì¸",
201 => "ìì±ë¨",
202 => "ìë½",
203 => "ì 뢰í ì ìë ì ë³´",
204 => "ë´ì© ìì",
205 => "ì½í
ì¸ ì¬ì¤ì ",
206 => "ë¶ë¶ì ì¸ ë´ì©",
207 => "ë¤ì¤ ìí",
208 => "ì´ë¯¸ ë³´ê³ ë¨",
226 => "IM ì¬ì©",
300 => "ë¤ì¤ ì í",
301 => "ì구ì ì¼ë¡ ì´ëëììµëë¤!",
302 => "ììë¡ ì´ëëììµëë¤!",
303 => "ë¤ë¥¸ 참조",
304 => "ìì ëì§ ìì",
305 => "íë¡ì ì¬ì©",
307 => "ìì 리ëë ì
!",
308 => "ì구 리ëë ì
!",
400 => "ì못ë ìì²!",
401 => "ì¸ì¦ íì!",
402 => "ê²°ì ê° íìí©ëë¤!",
403 => "ì ê·¼ì´ ê±°ë¶ë¨!",
404 => "ê°ì²´ ìì!",
405 => "íì©ëì§ ìë ìì² ë°©ì!",
406 => "íì©ëì§ ìì!",
407 => "íë¡ì ì¸ì¦ì´ íìí©ëë¤!",
408 => "ìì² ìê° ì´ê³¼!",
409 => "ì¶©ë!",
410 => "ìì²í 리ìì¤ë ë ì´ì ì ê³µëì§ ììµëë¤!",
411 => "ì못ë Content-Length!",
412 => "ì¬ì ì¡°ê±´ì´ ì¶©ì¡±ëì§ ìììµëë¤!",
413 => "ìì² ë³¸ë¬¸ì´ ë무 í½ëë¤!",
414 => "ì ì¶í URIê° ë무 ê¹ëë¤!",
415 => "ì§ìëì§ ìë 미ëì´ ì í!",
416 => "ë²ì를 ë§ì¡±ìí¬ ì ììµëë¤!",
417 => "기ë(Expect) ì¡°ê±´ì 충족íì§ ëª»íìµëë¤!",
418 => "ëë 주ì ìì
ëë¤",
421 => "ì못ë ìì²",
422 => "ì²ë¦¬í ì ìë ìí°í°!",
423 => "리ìì¤ê° ì 겨 ììµëë¤!",
424 => "ì¢
ìì±ì´ ì¤í¨íìµëë¤!",
425 => "ë무 ì´ë¥¸ ìì²!",
426 => "ì
ê·¸ë ì´ë íì!",
428 => "ì ì ì¡°ê±´ íì",
429 => "ìì²ì´ ë무 ë§ìµëë¤!",
431 => "ìì² í¤ëê° ë무 í¼!",
444 => "ìëµìì´ ì°ê²°ì´ ë«í",
451 => "ë²ì ì¬ì ë¡ ì´ì©í ì ììµëë¤!",
499 => "í´ë¼ì´ì¸í¸ê° ìì²ì ë«ì",
500 => "ìë² ì¤ë¥!",
501 => "ìì² ì²ë¦¬ ì¤í¨!",
502 => "ì못ë ê²ì´í¸ì¨ì´!",
503 => "ìë¹ì¤ë¥¼ ì¬ì©í ì ìì!",
504 => "ê²ì´í¸ì¨ì´ ìê° ì´ê³¼!",
505 => "HTTP ë²ì ì´ ì§ìëì§ ìì",
506 => "ë³íë ë³ëí©ëë¤!",
507 => "ì ì¥ ê³µê° ë¶ì¡±!",
508 => "루í ê°ì§ë¨!",
509 => "ëìí ì í ì´ê³¼",
510 => "íì¥ëì§ ìì",
511 => "ë¤í¸ìí¬ ì¸ì¦ íì",
599 => "ë¤í¸ìí¬ ì°ê²° ìê°ì´ê³¼ ì¤ë¥",
},
nb_NO => {
100 => "Fortsett",
101 => "Bytter protokoller",
102 => "Behandler",
103 => "Tidlige hint",
200 => "OK",
201 => "Opprettet",
202 => "Akseptert",
203 => "Ikke-autoritativ informasjon",
204 => "Intet innhold",
205 => "Tilbakestill innhold",
206 => "Delvis innhold",
207 => "Multi-status",
208 => "Allerede rapportert",
226 => "IM brukt",
300 => "Flere valg",
301 => "Flyttet permanent!",
302 => "Funnet (midlertidig omdirigering)!",
303 => "Se annet",
304 => "Ikke endret",
305 => "Bruk proxy",
307 => "Midlertidig omdirigering!",
308 => "Permanent omdirigering!",
400 => "Ugyldig forespørsel!",
401 => "Autentisering kreves!",
402 => "Betaling kreves!",
403 => "Adgang forbudt!",
404 => "Objektet ble ikke funnet!",
405 => "Metoden er ikke tillatt!",
406 => "Ikke akseptabelt!",
407 => "Proxy-autentisering kreves!",
408 => "Tidsgrense overskredet!",
409 => "Konflikt!",
410 => "Ressursen er ikke lenger tilgjengelig!",
411 => "Feil Content-Length!",
412 => "Forutsetning ikke oppfylt!",
413 => "Forespørselens innhold er for stort!",
414 => "Forespurt URI for lang!",
415 => "Mediatype støttes ikke!",
416 => "Område ikke tilfredsstillbart!",
417 => "Forventning kunne ikke oppfylles!",
418 => "Jeg er en tekanne",
421 => "Feiladressert forespørsel",
422 => "Kan ikke behandle enheten!",
423 => "Ressursen er låst!",
424 => "Avhengighet feilet!",
425 => "For tidlig!",
426 => "Oppgradering kreves!",
428 => "Forhåndsbetingelse kreves",
429 => "For mange forespørsler!",
431 => "Forespørselsheadere for store!",
444 => "Tilkobling lukket uten svar",
451 => "Ikke tilgjengelig av juridiske årsaker!",
499 => "Forespørsel lukket av klient",
500 => "Serverfeil!",
501 => "Kan ikke behandle forespørsel!",
502 => "Feil gateway!",
503 => "Tjenesten er ikke tilgjengelig!",
504 => "Tidsavbrudd i gateway!",
505 => "HTTP-versjon ikke støttet",
506 => "Varianten varierer også!",
507 => "Utilstrekkelig lagringsplass!",
508 => "Løkke oppdaget!",
509 => "BÃ¥ndbreddegrense overskredet",
510 => "Ikke utvidet",
511 => "Nettverksautentisering kreves",
599 => "Tidsavbrudd for nettverkstilkobling",
},
nl_NL => {
100 => "Doorgaan",
101 => "Protocolwisseling",
102 => "Verwerken",
103 => "Vroege hints",
200 => "OK",
201 => "Aangemaakt",
202 => "Geaccepteerd",
203 => "Niet-gezaghebbende informatie",
204 => "Geen inhoud",
205 => "Inhoud herstellen",
206 => "Gedeeltelijke inhoud",
207 => "Multi-status",
208 => "Reeds gerapporteerd",
226 => "IM gebruikt",
300 => "Meerdere keuzes",
301 => "Permanent verplaatst!",
302 => "Gevonden (tijdelijke omleiding)!",
303 => "Zie andere",
304 => "Niet gewijzigd",
305 => "Proxy gebruiken",
307 => "Tijdelijke omleiding!",
308 => "Permanente omleiding!",
400 => "Ongeldig verzoek!",
401 => "Authenticatie vereist!",
402 => "Betaling vereist!",
403 => "Toegang verboden!",
404 => "Object niet gevonden!",
405 => "Methode niet toegestaan!",
406 => "Niet acceptabel!",
407 => "Proxy-authenticatie vereist!",
408 => "Tijdlimiet overschreden!",
409 => "Conflict!",
410 => "Dit object is niet langer beschikbaar!",
411 => "Ongeldige Content-Length!",
412 => "Voorwaarde niet voldaan!",
413 => "Aanvraaginhoud te groot!",
414 => "Aangeboden URI te lang!",
415 => "Niet-ondersteund mediatype!",
416 => "Bereik niet te vervullen!",
417 => "Expectation niet voldaan!",
418 => "Ik ben een theepot",
421 => "Verkeerd gerichte aanvraag",
422 => "Niet-verwerkbare entiteit!",
423 => "Bron vergrendeld!",
424 => "Mislukte afhankelijkheid!",
425 => "Te vroeg!",
426 => "Upgrade vereist!",
428 => "Voorwaarde vereist",
429 => "Te veel verzoeken!",
431 => "Verzoekheaders te groot!",
444 => "Verbinding gesloten zonder antwoord",
451 => "Niet beschikbaar om juridische redenen!",
499 => "Aanvraag door cliënt gesloten",
500 => "Serverfout!",
501 => "Kan verzoek niet verwerken!",
502 => "Verkeerde Gateway!",
503 => "Dienst niet beschikbaar!",
504 => "Gateway-time-out!",
505 => "HTTP-versie niet ondersteund",
506 => "Variant varieert ook!",
507 => "Onvoldoende opslagruimte!",
508 => "Lus gedetecteerd!",
509 => "Bandbreedtelimiet overschreden",
510 => "Niet uitgebreid",
511 => "Netwerkauthenticatie vereist",
599 => "Time-out bij netwerkverbinding",
},
pl_PL => {
100 => "Kontynuuj",
101 => "Zmiana protokoÅów",
102 => "Przetwarzanie",
103 => "Wczesne wskazówki",
200 => "OK",
201 => "Utworzono",
202 => "PrzyjÄto",
203 => "Informacja nieautorytatywna",
204 => "Brak treÅci",
205 => "Resetuj treÅÄ",
206 => "CzÄÅciowa treÅÄ",
207 => "Wiele statusów",
208 => "Już zgÅoszono",
226 => "Użyto IM",
300 => "Wiele możliwoÅci",
301 => "Trwale przeniesiono!",
302 => "Znaleziono (tymczasowe przekierowanie)!",
303 => "Zobacz inne",
304 => "Nie zmodyfikowano",
305 => "Użyj serwera proxy",
307 => "Tymczasowe przekierowanie!",
308 => "StaÅe przekierowanie!",
400 => "NieprawidÅowe żÄ
danie!",
401 => "Wymagane uwierzytelnienie!",
402 => "Wymagana pÅatnoÅÄ!",
403 => "Zabroniony dostÄp!",
404 => "Nie znaleziono obiektu!",
405 => "Niedozwolona metoda!",
406 => "Nieakceptowalne!",
407 => "Wymagana autoryzacja proxy!",
408 => "Przedawnione żÄ
danie!",
409 => "Konflikt!",
410 => "Zasób usuniÄty!",
411 => "BÅÄdny nagÅówek Content-Length!",
412 => "Warunek wstÄpny niespeÅniony!",
413 => "TreÅÄ Å¼Ä
dania zbyt duża!",
414 => "Zbyt dÅugie URI!",
415 => "NieobsÅugiwany typ mediów!",
416 => "Zakres nie do zrealizowania!",
417 => "Oczekiwanie niespeÅnione!",
418 => "Jestem czajniczkiem",
421 => "Źle skierowane żÄ
danie",
422 => "Nieprzetwarzalna jednostka!",
423 => "Zasób zablokowany!",
424 => "BÅÄdna zależnoÅÄ!",
425 => "Zbyt wczeÅnie!",
426 => "Wymagana aktualizacja!",
428 => "Wymagany warunek wstÄpny",
429 => "Zbyt wiele żÄ
daÅ!",
431 => "NagÅówki żÄ
dania za duże!",
444 => "PoÅÄ
czenie zamkniÄte bez odpowiedzi",
451 => "NiedostÄpne z powodów prawnych!",
499 => "Å»Ä
danie zamkniÄte przez klienta",
500 => "BÅÄ
d serwera!",
501 => "Å»Ä
danie nieobsÅugiwane!",
502 => "NieprawidÅowa brama!",
503 => "Serwis niedostÄpny!",
504 => "Przekroczono limit czasu bramy!",
505 => "Wersja HTTP nieobsÅugiwana",
506 => "Wariant również siÄ zmienia!",
507 => "NiewystarczajÄ
ca przestrzeÅ dyskowa!",
508 => "Wykryto pÄtlÄ!",
509 => "Przekroczono limit przepustowoÅci",
510 => "Nie rozszerzono",
511 => "Wymagane uwierzytelnienie sieciowe",
599 => "Przekroczono limit czasu poÅÄ
czenia sieciowego",
},
pt_BR => {
100 => "Continuar",
101 => "Mudando protocolos",
102 => "Processando",
103 => "Dicas iniciais",
200 => "OK",
201 => "Criado",
202 => "Aceito",
203 => "Informação não autoritativa",
204 => "Sem conteúdo",
205 => "Redefinir conteúdo",
206 => "Conteúdo parcial",
207 => "Multi-status",
208 => "Já reportado",
226 => "IM usado",
300 => "Múltiplas escolhas",
301 => "Movido permanentemente!",
302 => "Encontrado (redirecionamento temporário)!",
303 => "Ver outro",
304 => "Não modificado",
305 => "Usar proxy",
307 => "Redirecionamento temporário!",
308 => "Redirecionamento permanente!",
400 => "Requisição inválida!",
401 => "Autenticação necessária!",
402 => "Pagamento necessário!",
403 => "Acesso Proibido!",
404 => "Objeto não encontrado!",
405 => "Método não permitido!",
406 => "Não aceitável!",
407 => "Autenticação de proxy necessária!",
408 => "Tempo excedido!",
409 => "Conflito!",
410 => "Recurso não está mais disponÃvel!",
411 => "Content-Length inválido!",
412 => "Falha na pré-condição!",
413 => "Volume de dados muito grande!",
414 => "URI enviado é muito longo!",
415 => "Tipo de mÃdia não suportado!",
416 => "Intervalo não satisfatÃvel!",
417 => "Expectativa não atendida!",
418 => "Eu sou um bule de chá",
421 => "Requisição mal direcionada",
422 => "Entidade não processável!",
423 => "Recurso bloqueado!",
424 => "Dependência falhou!",
425 => "Cedo demais!",
426 => "Atualização necessária!",
428 => "Pré-condição necessária",
429 => "Muitas requisições!",
431 => "Cabeçalhos de requisição muito grandes!",
444 => "Conexão fechada sem resposta",
451 => "IndisponÃvel por motivos legais!",
499 => "Requisição fechada pelo cliente",
500 => "Erro interno do Servidor!",
501 => "A requisição não pode ser processada!",
502 => "Gateway inválido!",
503 => "Serviço indisponÃvel!",
504 => "Tempo esgotado do gateway!",
505 => "Versão HTTP não suportada",
506 => "A variante também varia!",
507 => "Armazenamento insuficiente!",
508 => "Loop detectado!",
509 => "Limite de banda excedido",
510 => "Não estendido",
511 => "Autenticação de rede necessária",
599 => "Erro de tempo de conexão de rede",
},
pt_PT => {
100 => "Continuar",
101 => "A mudar protocolos",
102 => "A processar",
103 => "Dicas iniciais",
200 => "OK",
201 => "Criado",
202 => "Aceite",
203 => "Informação não autoritativa",
204 => "Sem conteúdo",
205 => "Repor conteúdo",
206 => "Conteúdo parcial",
207 => "Multi-estado",
208 => "Já reportado",
226 => "IM usado",
300 => "Várias opções",
301 => "Movido permanentemente!",
302 => "Encontrado (redirecionamento temporário)!",
303 => "Ver outro",
304 => "Não modificado",
305 => "Usar proxy",
307 => "Redirecionamento temporário!",
308 => "Redirecionamento permanente!",
400 => "Pedido incorreto!",
401 => "Autenticação necessária!",
402 => "Pagamento exigido!",
403 => "Acesso proibido!",
404 => "Objeto não encontrado!",
405 => "Método não permitido!",
406 => "Não aceitável!",
407 => "Autenticação de proxy necessária!",
408 => "Tempo excedido!",
409 => "Conflito!",
410 => "Recurso já não está disponÃvel!",
411 => "Content-Length incorreto!",
412 => "Falha na pré-condição!",
413 => "Volume de dados demasiado grande!",
414 => "URI demasiado longo!",
415 => "Tipo de média não suportado!",
416 => "Intervalo não satisfazÃvel!",
417 => "Expectativa não satisfeita!",
418 => "Sou um bule de chá",
421 => "Pedido mal direcionado",
422 => "Entidade não processável!",
423 => "Recurso bloqueado!",
424 => "Dependência falhou!",
425 => "Demasiado cedo!",
426 => "Atualização necessária!",
428 => "Pré-condição necessária",
429 => "Pedidos em excesso!",
431 => "Cabeçalhos de pedido muito grandes!",
444 => "Ligação fechada sem resposta",
451 => "IndisponÃvel por motivos legais!",
499 => "Pedido fechado pelo cliente",
500 => "Erro interno do servidor!",
501 => "Não posso processar o pedido!",
502 => "Gateway inválido!",
503 => "Serviço indisponÃvel!",
504 => "Tempo excedido na gateway!",
505 => "Versão HTTP não suportada",
506 => "A variante também varia!",
507 => "Armazenamento insuficiente!",
508 => "Loop detetado!",
509 => "Limite de largura de banda excedido",
510 => "Não estendido",
511 => "Autenticação de rede necessária",
599 => "Erro de tempo limite de ligação de rede",
},
ro_RO => {
100 => "ContinuaÈi",
101 => "Schimbarea protocoalelor",
102 => "Se proceseazÄ",
103 => "Indicii timpurii",
200 => "OK",
201 => "Creat",
202 => "Acceptat",
203 => "InformaÈii neautoritare",
204 => "FÄrÄ conÈinut",
205 => "ResetaÈi conÈinutul",
206 => "ConÈinut parÈial",
207 => "Multi-status",
208 => "Deja raportat",
226 => "IM utilizat",
300 => "Mai multe opÈiuni",
301 => "Mutat permanent!",
302 => "GÄsit (redirecÈionare temporarÄ)!",
303 => "Vezi altele",
304 => "Neschimbat",
305 => "UtilizaÈi proxy",
307 => "RedirecÈionare temporarÄ!",
308 => "RedirecÈionare permanentÄ!",
400 => "Cerere nevalidÄ!",
401 => "Autentificare necesarÄ!",
402 => "Plata necesarÄ!",
403 => "Accesul interzis!",
404 => "Obiectul nu a fost gasit!",
405 => "MetodÄ nepermisÄ!",
406 => "Inacceptabil!",
407 => "Este necesarÄ autentificarea prin proxy!",
408 => "Time-out al cererii!",
409 => "Conflict!",
410 => "Resursa nu mai este disponibilÄ!",
411 => "Content-Length invalid!",
412 => "PrecondiÈia a eÈuat!",
413 => "Entitatea cererii este prea mare!",
414 => "URI-ul trimis este prea lung!",
415 => "Tip de date nesuportat!",
416 => "Interval nesatisfiabil!",
417 => "AÈteptarea nu a fost îndeplinitÄ!",
418 => "Sunt un ceainic",
421 => "Cerere direcÈionatÄ greÈit",
422 => "Entitate imposibil de procesat!",
423 => "Resursa este blocatÄ!",
424 => "DependenÈÄ eÈuatÄ!",
425 => "Prea devreme!",
426 => "Actualizare necesarÄ!",
428 => "PrecondiÈie necesarÄ",
429 => "Prea multe cereri!",
431 => "Antete de cerere prea mari!",
444 => "Conexiune închisÄ fÄrÄ rÄspuns",
451 => "Indisponibil din motive legale!",
499 => "Cerere închisÄ de client",
500 => "Eroare server!",
501 => "Cererea nu poate fi procesatÄ!",
502 => "Gateway invalid!",
503 => "Serviciu indisponibil!",
504 => "DepÄÈire de timp a gateway-ului!",
505 => "Versiune HTTP nesuportatÄ",
506 => "Varianta variazÄ, de asemenea!",
507 => "SpaÈiu de stocare insuficient!",
508 => "BuclÄ detectatÄ!",
509 => "LimitÄ de lÄÈime de bandÄ depÄÈitÄ",
510 => "Neextins",
511 => "Autentificare de reÈea necesarÄ",
599 => "Eroare: expirare timp conexiune la reÈea",
},
# 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>
# <https://developer.roman.grinyov.name/blog/80>
ru_RU => {
100 => "пÑодолжай",
101 => "пеÑеклÑÑение пÑоÑоколов",
102 => "идÑÑ Ð¾Ð±ÑабоÑка",
103 => "ÑаннÑÑ Ð¼ÐµÑаинÑоÑмаÑиÑ",
200 => "Ñ
оÑоÑо",
201 => "Ñоздано",
202 => "пÑинÑÑо",
203 => "инÑоÑмаÑÐ¸Ñ Ð½Ðµ авÑоÑиÑеÑна",
204 => "Ð½ÐµÑ ÑодеÑжимого",
205 => "ÑбÑоÑиÑÑ ÑодеÑжимое",
206 => "ÑаÑÑиÑное ÑодеÑжимое",
207 => "многоÑÑаÑÑÑнÑй",
208 => "Ñже ÑообÑалоÑÑ",
226 => "иÑполÑзовано IM",
300 => "множеÑÑво вÑбоÑов",
301 => "ÐеÑемеÑено навÑегда!",
302 => "Ðайдено (вÑеменное пеÑенапÑавление)!",
303 => "ÑмоÑÑеÑÑ Ð´ÑÑгое",
304 => "не изменÑлоÑÑ",
305 => "иÑполÑзоваÑÑ Ð¿ÑокÑи",
307 => "ÐÑеменное пеÑенапÑавление!",
308 => "ÐоÑÑоÑнное пеÑенапÑавление!",
400 => "ÐевеÑнÑй запÑоÑ!",
401 => "ÐеобÑ
одима аÑÑенÑиÑикаÑиÑ!",
402 => "ТÑебÑеÑÑÑ Ð¾Ð¿Ð»Ð°Ñа!",
403 => "ÐоÑÑÑп запÑеÑÑн!",
404 => "ÐбÑÐµÐºÑ Ð½Ðµ найден!",
405 => "ÐеÑод не поддеÑживаеÑÑÑ!",
406 => "ÐепÑиемлемо!",
407 => "ТÑебÑеÑÑÑ Ð°ÑÑенÑиÑикаÑÐ¸Ñ Ð¿ÑокÑи!",
408 => "ÐÑÑекло вÑÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ!",
409 => "ÐонÑликÑ!",
410 => "ÐокÑÐ¼ÐµÐ½Ñ ÑдалÑн!",
411 => "ÐевеÑнÑй заголовок Content-Length!",
412 => "ÐÑедÑÑловие не вÑполнено!",
413 => "Ð Ð°Ð·Ð¼ÐµÑ Ð·Ð°Ð¿ÑоÑа ÑлиÑком велик!",
414 => "URI ÑлиÑком длиннÑй!",
415 => "ÐеподдеÑживаемÑй Ñип медиа!",
416 => "Ðиапазон не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ ÑдовлеÑвоÑÑн!",
417 => "Ðжидание не вÑполнено!",
418 => "Ñ - Ñайник",
421 => "ÐевеÑно адÑеÑованнÑй запÑоÑ",
422 => "ÐеобÑабаÑÑÐ²Ð°ÐµÐ¼Ð°Ñ ÑÑÑноÑÑÑ!",
423 => "РеÑÑÑÑ Ð·Ð°Ð±Ð»Ð¾ÐºÐ¸Ñован!",
424 => "Сбой завиÑимоÑÑи!",
425 => "СлиÑком Ñано!",
426 => "ТÑебÑеÑÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ðµ!",
428 => "необÑ
одимо пÑедÑÑловие",
429 => "СлиÑком много запÑоÑов!",
431 => "Ðаголовки запÑоÑа ÑлиÑком велики!",
444 => "Соединение закÑÑÑо без оÑвеÑа",
451 => "ÐедоÑÑÑпно по ÑÑидиÑеÑким пÑиÑинам!",
499 => "ÐºÐ»Ð¸ÐµÐ½Ñ Ð·Ð°ÐºÑÑл Ñоединение",
500 => "ÐÑибка ÑеÑвеÑа!",
501 => "ÐапÑÐ¾Ñ Ð½Ðµ Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¾Ð±ÑабоÑан!",
502 => "ÐевеÑнÑй ÑлÑз!",
503 => "СеÑÐ²Ð¸Ñ Ð½ÐµÐ´Ð¾ÑÑÑпен!",
504 => "Тайм-аÑÑ ÑлÑза!",
505 => "веÑÑÐ¸Ñ HTTP не поддеÑживаеÑÑÑ",
506 => "ÐаÑÐ¸Ð°Ð½Ñ Ñакже менÑеÑÑÑ!",
507 => "ÐедоÑÑаÑоÑно памÑÑи Ð´Ð»Ñ Ñ
ÑанениÑ!",
508 => "ÐбнаÑÑжен Ñикл!",
509 => "иÑÑеÑпана пÑопÑÑÐºÐ½Ð°Ñ ÑиÑина канала",
510 => "не ÑаÑÑиÑено",
511 => "ÑÑебÑеÑÑÑ ÑеÑÐµÐ²Ð°Ñ Ð°ÑÑенÑиÑикаÑиÑ",
599 => "ÐÑибка Ñайм-аÑÑа ÑеÑевого подклÑÑениÑ",
},
sr_RS => {
100 => "ÐаÑÑави",
101 => "ÐÑомена пÑоÑокола",
102 => "ÐбÑада Ñ ÑокÑ",
103 => "Рани наговеÑÑаÑи",
200 => "У ÑедÑ",
201 => "ÐÑеиÑано",
202 => "ÐÑиÑ
ваÑено",
203 => "ÐеаÑÑоÑиÑаÑивне инÑоÑмаÑиÑе",
204 => "Ðема ÑадÑжаÑа",
205 => "РеÑÐµÑ ÑадÑжаÑа",
206 => "ÐелимиÑан ÑадÑжаÑ",
207 => "ÐиÑеÑÑаÑÑÑ",
208 => "ÐÐµÑ Ð¿ÑиÑавÑено",
226 => "ÐРкоÑиÑÑен",
300 => "ÐиÑе избоÑа",
301 => "ТÑаÑно пÑемеÑÑено!",
302 => "ÐÑонаÑено (пÑивÑемено пÑеÑÑмеÑаваÑе)!",
303 => "ÐÐ¾Ð³Ð»ÐµÐ´Ð°Ñ Ð´ÑÑго",
304 => "ÐиÑе измеÑено",
305 => "ÐоÑиÑÑи пÑокÑи",
307 => "ÐÑивÑемено пÑеÑÑмеÑаваÑе!",
308 => "ТÑаÑно пÑеÑÑмеÑаваÑе!",
400 => "ÐÐ¾Ñ Ð·Ð°Ñ
Ñев!",
401 => "Ðбавезна аÑÑенÑиÑикаÑиÑа!",
402 => "ÐоÑÑебно плаÑаÑе!",
403 => "ÐабÑаÑен пÑиÑÑÑп!",
404 => "ÐбÑÐµÐºÐ°Ñ Ð½Ð¸Ñе пÑонаÑен!",
405 => "ÐеÑод ниÑе дозвоÑен!",
406 => "ÐепÑиÑ
ваÑÑиво!",
407 => "ÐоÑÑебна Ñе пÑокÑи аÑÑенÑикаÑиÑа!",
408 => "ÐаÑ
ÑÐµÐ²Ñ Ñе иÑÑекло вÑеме!",
409 => "СÑкоб!",
410 => "РеÑÑÑÑ Ð½Ð¸Ñе виÑе доÑÑÑпан!",
411 => "ÐеиÑпÑавно Content-Length заглавÑе!",
412 => "ÐÑедÑÑлов ниÑе иÑпÑÑен!",
413 => "Тело заÑ
Ñева Ñе пÑевелико!",
414 => "ÐоÑлаÑи УРРÑе пÑедÑгаÑак!",
415 => "ÐеподÑжана вÑÑÑа медиÑа!",
416 => "ÐпÑег ниÑе могÑÑе иÑпÑниÑи!",
417 => "ÐÑекиваÑе ниÑе иÑпÑÑено!",
418 => "Ðа Ñам ÑаÑник",
421 => "ÐогÑеÑно ÑÑмеÑен заÑ
Ñев",
422 => "ÐеобÑадив енÑиÑеÑ!",
423 => "РеÑÑÑÑ Ñе закÑÑÑан!",
424 => "ÐеÑÑпела завиÑноÑÑ!",
425 => "ÐÑеÑано!",
426 => "ÐоÑÑебна надогÑадÑа!",
428 => "ÐоÑÑебан пÑедÑÑлов",
429 => "ÐÑевиÑе заÑ
Ñева!",
431 => "ÐаглавÑа заÑ
Ñева ÑÑ Ð¿Ñевелика!",
444 => "Ðеза заÑвоÑена без одговоÑа",
451 => "ÐедоÑÑÑпно из пÑавниÑ
Ñазлога!",
499 => "ÐлиÑÐµÐ½Ñ Ñе заÑвоÑио заÑ
Ñев",
500 => "ÐÑеÑка ÑеÑвеÑа!",
501 => "Ðе Ð¼Ð¾Ð³Ñ Ð´Ð° обÑадим заÑ
Ñев!",
502 => "ÐÐ¾Ñ Ð¿Ñолаз!",
503 => "УÑлÑга Ñе недоÑÑÑпна!",
504 => "ÐÑÑекло вÑеме пÑолаза (gateway)!",
505 => "HTTP веÑзиÑа ниÑе подÑжана",
506 => "ÐаÑиÑанÑа ÑакоÑе ваÑиÑа!",
507 => "ÐедовоÑно пÑоÑÑоÑа за ÑкладиÑÑеÑе!",
508 => "ÐÑкÑивена пеÑÑа!",
509 => "ÐÑевазиÑено огÑаниÑеÑе пÑопÑÑног опÑега",
510 => "ÐиÑе пÑоÑиÑено",
511 => "ÐоÑÑебна мÑежна аÑÑенÑиÑикаÑиÑа",
599 => "ÐÑеÑка: иÑÑек вÑемена на мÑÐµÐ¶Ð½Ð¾Ñ Ð²ÐµÐ·Ð¸",
},
sv_SE => {
100 => "Fortsätt",
101 => "Växlar protokoll",
102 => "Bearbetar",
103 => "Tidiga tips",
200 => "OK",
201 => "Skapad",
202 => "Accepterad",
203 => "Icke-auktoritativ information",
204 => "Inget innehåll",
205 => "Ã
terställ innehåll",
206 => "Partiellt innehåll",
207 => "Multi-status",
208 => "Redan rapporterat",
226 => "IM används",
300 => "Flera val",
301 => "Flyttad permanent!",
302 => "Hittad (tillfällig omdirigering)!",
303 => "Se annat",
304 => "Inte ändrad",
305 => "Använd proxy",
307 => "Tillfällig omdirigering!",
308 => "Permanent omdirigering!",
400 => "Felaktig förfrågan!",
401 => "Autentisering krävs!",
402 => "Betalning krävs!",
403 => "Ã
tkomst förbjuden!",
404 => "Objektet hittas ej!",
405 => "Metoden inte tillåten!",
406 => "Inte acceptabelt!",
407 => "Proxyautentisering krävs!",
408 => "Tidsgränsen överskreds!",
409 => "Konflikt!",
410 => "Resursen är inte längre tillgänglig!",
411 => "Felaktig Content-Length!",
412 => "Förhandsvillkor uppfylldes inte!",
413 => "Begärans innehåll är för stort!",
414 => "Efterfrågad URI för lång!",
415 => "Mediatypen stöds ej!",
416 => "Begärt intervall kan inte tillgodoses!",
417 => "Förväntan uppfylldes inte!",
418 => "Jag är en tekanna",
421 => "Feladresserad begäran",
422 => "Obehandlingsbar enhet!",
423 => "Resursen är låst!",
424 => "Misslyckat beroende!",
425 => "För tidigt!",
426 => "Uppgradering krävs!",
428 => "Förhandsvillkor krävs",
429 => "För många förfrågningar!",
431 => "Begäransrubriker för stora!",
444 => "Anslutning stängd utan svar",
451 => "Otillgänglig av juridiska skäl!",
499 => "Begäran stängd av klienten",
500 => "Serverfel!",
501 => "Kan inte behandla begäran!",
502 => "Felaktig Gateway!",
503 => "Tjänsten ej tillgänglig!",
504 => "Tidsgräns i gateway överskreds!",
505 => "HTTP-version stöds inte",
506 => "Varianten varierar också!",
507 => "Otillräckligt lagringsutrymme!",
508 => "Loop upptäckt!",
509 => "Bandbreddsgräns överskriden",
510 => "Inte utökad",
511 => "Nätverksautentisering krävs",
599 => "Tidsgräns för nätverksanslutning överskreds",
},
tr_TR => {
100 => "Devam et",
101 => "Protokoller deÄiÅtiriliyor",
102 => "İÅleniyor",
103 => "Erken ipuçları",
200 => "Tamam",
201 => "OluÅturuldu",
202 => "Kabul edildi",
203 => "Yetkili olmayan bilgi",
204 => "İçerik yok",
205 => "İçeriÄi sıfırla",
206 => "Kısmi içerik",
207 => "Ãoklu durum",
208 => "Zaten bildirildi",
226 => "IM kullanıldı",
300 => "Birden çok seçenek",
301 => "Kalıcı olarak taÅındı!",
302 => "Bulundu (geçici yönlendirme)!",
303 => "BaÅka bir yere bakın",
304 => "DeÄiÅtirilmedi",
305 => "Vekil sunucu kullan",
307 => "Geçici yönlendirme!",
308 => "Kalıcı yönlendirme!",
400 => "Hatalı istek!",
401 => "Kimlik doÄrulama gerekli!",
402 => "Ãdeme gerekli!",
403 => "EriÅim engellendi!",
404 => "Nesne mevcut deÄil!",
405 => "Yönteme izin verilmedi!",
406 => "Kabul edilemez!",
407 => "Vekil sunucu kimlik doÄrulaması gerekli!",
408 => "İstekte zaman aÅımı!",
409 => "ÃakıÅma!",
410 => "Kaynak artık mevcut deÄil!",
411 => "Hatalı Content-Length baÅlıÄı!",
412 => "ÃnkoÅul karÅılanamadı!",
413 => "İstek gövdesi çok büyük!",
414 => "Gönderilen URI çok uzun!",
415 => "Desteklenmeyen ortam türü!",
416 => "Aralık karÅılanamaz!",
417 => "Beklenti karÅılanamadı!",
418 => "Ben bir çaydanlıÄım",
421 => "YanlıŠyönlendirilmiŠistek",
422 => "İÅlenemeyen varlık!",
423 => "Kaynak kilitlendi!",
424 => "BaÄımlılık baÅarısız!",
425 => "Ãok erken!",
426 => "Yükseltme gerekli!",
428 => "ÃnkoÅul gerekli",
429 => "Ãok fazla istek!",
431 => "İstek baÅlıkları çok büyük!",
444 => "Yanıt verilmeden baÄlantı kapatıldı",
451 => "Hukuki nedenlerle kullanılamıyor!",
499 => "İstek istemci tarafından kapatıldı",
500 => "Sunucu hatası!",
501 => "İstek yerine getirilemiyor!",
502 => "Hatalı AÄ Geçidi!",
503 => "Hizmet sunulamıyor!",
504 => "AÄ geçidi zaman aÅımı!",
505 => "HTTP sürümü desteklenmiyor",
506 => "Varyant da deÄiÅiyor!",
507 => "Yetersiz depolama alanı!",
508 => "Döngü tespit edildi!",
509 => "Bant geniÅliÄi sınırı aÅıldı",
510 => "GeniÅletilmemiÅ",
511 => "AÄ kimlik doÄrulaması gerekli",
599 => "AÄ baÄlantısı zaman aÅımı hatası",
},
# Ref: <https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status>
# <https://www.websiterating.com/zh-CN/resources/http-status-codes-cheat-sheet/>
# <https://zh.wikipedia.org/wiki/HTTP%E7%8A%B6%E6%80%81%E7%A0%81>
# <https://learn.microsoft.com/zh-cn/onedrive/developer/rest-api/concepts/errors?view=odsp-graph-online>
# <https://tinychen.com/20200717-http-code-introduction/>
zh_CN => {
100 => "ç»§ç»",
101 => "忢åè®®",
102 => "å¤çä¸",
103 => "æ©ææç¤º",
200 => "OK",
201 => "å建",
202 => "å·²æ¥å",
203 => "éæå¨ä¿¡æ¯",
204 => "æ å
容",
205 => "éç½®å
容",
206 => "é¨åå
容",
207 => "å¤ç¶æ",
208 => "å·²æ¥å",
226 => "IM已使ç¨",
300 => "å¤é¡¹éæ©",
301 => "已永ä¹
ç§»å¨ï¼",
302 => "å·²æ¾å°ï¼ä¸´æ¶éå®åï¼ï¼",
303 => "æ¥çå
¶ä»",
304 => "æªä¿®æ¹",
305 => "使ç¨ä»£ç",
307 => "临æ¶éå®åï¼",
308 => "æ°¸ä¹
éå®åï¼",
400 => "æ æè¯·æ±ï¼",
401 => "éè¦è®¤è¯ï¼",
402 => "éè¦ä»æ¬¾ï¼",
403 => "ç¦æ¢è®¿é®ï¼",
404 => "æ¾ä¸å°å¯¹è±¡ï¼",
405 => "请æ±çæ¹æ³ä¸å
许ï¼",
406 => "ä¸å¯æ¥åï¼",
407 => "éè¦ä»£ç身份éªè¯ï¼",
408 => "请æ±è¶
æ¶ï¼",
409 => "å²çªï¼",
410 => "èµæºä¸åå¯ç¨ï¼",
411 => "æ æç Content-Lengthï¼",
412 => "å
峿¡ä»¶æªæ»¡è¶³ï¼",
413 => "请æ±ä½è¿å¤§ï¼",
414 => "æäº¤ç URI è¿é¿ï¼",
415 => "䏿¯æçåªä½ç±»åï¼",
416 => "èå´æ æ³æ»¡è¶³ï¼",
417 => "æªè½æ»¡è¶³è¯·æ±ææï¼",
418 => "ææ¯ä¸ä¸ªè¶å£¶",
421 => "é误å®åç请æ±",
422 => "æ æ³å¤ççå®ä½ï¼",
423 => "èµæºå·²éå®ï¼",
424 => "ä¾èµå¤±è´¥ï¼",
425 => "为æ¶è¿æ©ï¼",
426 => "éè¦å级ï¼",
428 => "éè¦åææ¡ä»¶",
429 => "请æ±è¿å¤ï¼",
431 => "请æ±å¤´å段è¿å¤§ï¼",
444 => "è¿æ¥å
³é没æååº",
451 => "å æ³å¾åå æ æ³æä¾ï¼",
499 => "客æ·å
³é请æ±",
500 => "æå¡å¨é误ï¼",
501 => "æ æ³æ§è¡è¯·æ±ï¼",
502 => "é误çç½å
³ï¼",
503 => "æå¡ä¸å¯ç¨ï¼",
504 => "ç½å
³è¶
æ¶ï¼",
505 => "䏿¯æçHTTPçæ¬",
506 => "åä½ä¹ä¼ååï¼",
507 => "åå¨ç©ºé´ä¸è¶³ï¼",
508 => "æ£æµå°å¾ªç¯ï¼",
509 => "è¶
åºå¸¦å®½éå¶",
510 => "æªæ©å±",
511 => "éè¦ç½ç»èº«ä»½éªè¯",
599 => "ç½ç»è¿æ¥è¶
æ¶é误",
},
# Ref: <https://zh.wikipedia.org/zh-tw/HTTP%E7%8A%B6%E6%80%81%E7%A0%81>
# <https://developer.mozilla.org/zh-TW/docs/Web/HTTP/Status>
# <https://www.websitehostingrating.com/zh-TW/http-status-codes-cheat-sheet/>
zh_TW => {
100 => "ç¹¼çº",
101 => "交æåè°",
102 => "èç",
103 => "æ©ææç¤º",
200 => "OK",
201 => "å·²åµå»º",
202 => "å·²æ¶å°è«æ±",
203 => "鿬å¨ä¿¡æ¯",
204 => "æ²æå
§å®¹",
205 => "éè¨å
§å®¹",
206 => "é¨åå
§å®¹",
207 => "å¤éçæ
",
208 => "å·²å ±å",
226 => "使ç¨äºIM",
300 => "å¤é鏿",
301 => "已永ä¹
ç§»åï¼",
302 => "å·²æ¾å°ï¼è¨æéæ°å°åï¼ï¼",
303 => "æ¥çå
¶ä»",
304 => "æªä¿®æ¹",
305 => "使ç¨ä»£ç",
307 => "è¨æéæ°å°åï¼",
308 => "æ°¸ä¹
éæ°å°åï¼",
400 => "è«æ±é¯èª¤ï¼",
401 => "éè¦èªèï¼",
402 => "éè¦ä»æ¬¾ï¼",
403 => "ç¦æ¢è¨ªåï¼",
404 => "æ¾ä¸å°ç©ä»¶ï¼",
405 => "è«æ±çæ¹æ³ä¸å
許ï¼",
406 => "ä¸å¯æ¥åï¼",
407 => "éè¦ä»£ç伺æå¨é©èï¼",
408 => "è«æ±è¶
æï¼",
409 => "è¡çªï¼",
410 => "è³æºä¸åå¯ç¨ï¼",
411 => "ç¡æç Content-Lengthï¼",
412 => "å
決æ¢ä»¶æªæ»¿è¶³ï¼",
413 => "è«æ±é«é大ï¼",
414 => "æäº¤ç URI éé·ï¼",
415 => "䏿¯æ´çåªé«åå¼ï¼",
416 => "ç¡æ³æ»¿è¶³è«æ±ç¯åï¼",
417 => "æªè½æ»¿è¶³è«æ±ææï¼",
418 => "ææ¯è¶å£º",
421 => "é¯èª¤å®åçè«æ±",
422 => "ç¡æ³èçç實é«ï¼",
423 => "è³æºå·²éå®ï¼",
424 => "ç¸ä¾éä¿å¤±æï¼",
425 => "ææ©éæ©ï¼",
426 => "éè¦åç´ï¼",
428 => "éè¦å
決æ¢ä»¶",
429 => "è«æ±éå¤ï¼",
431 => "è«æ±æ¨é æ¬ä½é大ï¼",
444 => "飿¥ééèæ²æé¿æ",
451 => "å æ³å¾å ç´ ç¡æ³æä¾ï¼",
499 => "ç¨æ¶ç«¯ééè«æ±",
500 => "伺æå¨é¯èª¤ï¼",
501 => "ç¡æ³å·è¡è«æ±ï¼",
502 => "ééå¨é¯èª¤ï¼",
503 => "æåä¸å¯ç¨ï¼",
504 => "éé龿ï¼",
505 => "䏿¯æHTTPçæ¬",
506 => "è®é«ä¹æè®åï¼",
507 => "å²å空éä¸è¶³ï¼",
508 => "嵿¸¬å°å¾ªç°ï¼",
509 => "è¶
é帶寬éå¶",
510 => "æªæ´å±",
511 => "éè¦ç¶²è·¯é©è",
599 => "ç¶²çµ¡é£æ¥è¶
æé¯èª¤",
},
};
our $MAP_LANG_SHORT =
{
de => 'de_DE',
en => 'en_GB',
fr => 'fr_FR',
it => 'it_IT',
ja => 'ja_JP',
ko => 'ko_KR',
nl => 'nl_NL',
pl => 'pl_PL',
pt => 'pt_PT',
ro => 'ro_RO',
ru => 'ru_RU',
'tr' => 'tr_TR',
zh => 'zh_TW',
};
# So that querying the hash directly with $HTTP_CODES->{ja} works too
foreach my $lang ( keys( %$MAP_LANG_SHORT ) )
{
$HTTP_CODES->{ $lang } = $HTTP_CODES->{ $MAP_LANG_SHORT->{ $lang } };
}
our $STATUS_TO_TYPE =
{
301 => "moved_permanently",
302 => "moved_temporarily",
307 => "redirect_temporarily",
308 => "redirect_permanent",
400 => "bad_request",
401 => "unauthorized",
402 => "payment_required",
403 => "forbidden",
404 => "not_found",
405 => "method_not_allowed",
406 => "not_acceptable",
407 => "proxy_authentication_required",
408 => "request_time_out",
409 => "conflict",
410 => "gone",
411 => "length_required",
412 => "precondition_failed",
413 => "request_entity_too_large",
414 => "request_uri_too_large",
415 => "unsupported_media_type",
416 => "range_not_satisfiable",
417 => "expectation_failed",
422 => "unprocessable_entity",
423 => "locked",
424 => "failed_dependency",
425 => "too_early",
426 => "upgrade_required",
429 => "too_many_requests",
431 => "request_header_fields_too_large",
451 => "unavailable_for_legal_reasons",
500 => "internal_server_error",
501 => "not_implemented",
502 => "bad_gateway",
503 => "service_unavailable",
504 => "gateway_timeout",
505 => "http_version_not_supported",
506 => "variant_also_varies",
507 => "insufficient_storage",
508 => "loop_detected",
};
# Missing constants in Apache2::Const
my $additions =
{
103 => 'EARLY_HINTS',
418 => 'I_AM_A_TEA_POT',
421 => 'MISDIRECTED_REQUEST',
425 => 'TOO_EARLY',
444 => 'CONNECTION_CLOSED_WITHOUT_RESPONSE',
451 => 'UNAVAILABLE_FOR_LEGAL_REASONS',
499 => 'CLIENT_CLOSED_REQUEST',
505 => 'HTTP_VERSION_NOT_SUPPORTED',
509 => 'BANDWIDTH_LIMIT_EXCEEDED',
599 => 'NETWORK_CONNECT_TIMEOUT_ERROR',
};
foreach my $code ( keys( %$additions ) )
{
unless( Apache2::Const->can( $additions->{ $code } ) )
{
eval( "*Apache2::Const::" . $additions->{ $code } . " = sub{$code};" );
warn( "Error adding Apache2::Const for HTTP code $code: $@" ) if( $@ );
}
}
sub init
{
my $self = shift( @_ );
my $r = shift( @_ );
$self->SUPER::init( @_ );
return( $self );
}
sub convert_short_lang_to_long
{
my $self = shift( @_ );
my $lang = shift( @_ );
# Nothing to do; we already have a good value
return( $lang ) if( $lang =~ /^[a-z]{2}_[A-Z]{2}$/ );
return( $MAP_LANG_SHORT->{ lc( $lang ) } ) if( CORE::exists( $MAP_LANG_SHORT->{ lc( $lang ) } ) );
return( '' );
}
sub is_cacheable_by_default
{
my $self = shift( @_ );
my $code = shift( @_ );
return( $self->error( "A 3 digit code is required." ) ) if( !defined( $code ) || $code !~ /^\d{3}$/ );
return(
$code == 200 # OK
|| $code == 203 # Non-Authoritative Information
|| $code == 204 # No Content
|| $code == 206 # Not Acceptable
|| $code == 300 # Multiple Choices
|| $code == 301 # Moved Permanently
|| $code == 308 # Permanent Redirect
|| $code == 404 # Not Found
|| $code == 405 # Method Not Allowed
|| $code == 410 # Gone
|| $code == 414 # Request-URI Too Large
|| $code == 451 # Unavailable For Legal Reasons
|| $code == 501 # Not Implemented
);
}
sub is_client_error { return( shift->_min_max( 400 => 500, @_ ) ); }
sub is_error { return( shift->_min_max( 400 => 600, @_ ) ); }
sub is_info { return( shift->_min_max( 100 => 200, @_ ) ); }
sub is_redirect { return( shift->_min_max( 300 => 400, @_ ) ); }
sub is_server_error { return( shift->_min_max( 500 => 600, @_ ) ); }
sub is_success { return( shift->_min_max( 200 => 300, @_ ) ); }
sub status_to_type
{
my $self = shift( @_ );
my $code = shift( @_ );
my $sep = shift( @_ );
if( !defined( $sep ) ||
( defined( $sep ) && $sep eq '_' ) )
{
return( $STATUS_TO_TYPE->{ $code } );
}
( my $type = $STATUS_TO_TYPE->{ $code } ) =~ s/_/$sep/g;
return( $type );
}
# Returns a status line for a given code
# e.g. status_message( 404 ) would yield "Not found"
sub status_message
{
my $self = shift( @_ );
my( $code, $lang );
if( scalar( @_ ) == 2 )
{
( $code, $lang ) = @_;
}
else
{
$code = shift( @_ );
$lang = 'en_GB';
}
$lang = 'en_GB' if( !exists( $HTTP_CODES->{ $lang } ) );
my $ref = $HTTP_CODES->{ $lang };
return( $ref->{ $code } );
}
sub supported_languages
{
my $self = shift( @_ );
return( [sort( keys( %$HTTP_CODES ) )] );
}
sub _min_max
{
my $this = shift( @_ );
my( $min, $max, $code ) = @_;
return( $this->error( "A 3 digit code is required." ) ) if( !defined( $code ) || $code !~ /^\d{3}$/ );
return( $code >= $min && $code < $max );
}
# NOTE: sub FREEZE is inherited
sub STORABLE_freeze { CORE::return( CORE::shift->FREEZE( @_ ) ); }
sub STORABLE_thaw { CORE::return( CORE::shift->THAW( @_ ) ); }
# NOTE: sub THAW is inherited
1;
# NOTE: POD
__END__
=encoding utf8
=head1 NAME
Apache2::API::Status - Apache2 Status Codes
=head1 SYNOPSIS
use Apache2::API::Status ':common';
use Apache2::API::Status ':all';
say Apache2::API::Status::HTTP_TOO_MANY_REQUESTS;
# returns code 429
use Apache2::API::Status;
# in German: Zu viele Anfragen
say $Apache2::API::Status::HTTP_CODES->{de_DE}->{429};
# same
say $Apache2::API::Status::HTTP_CODES->{de}->{429};
# In English: Too Many Requests
say $Apache2::API::Status::HTTP_CODES->{en_GB}->{429};
# same
say $Apache2::API::Status::HTTP_CODES->{en}->{429};
# in French: Trop de requête
say $Apache2::API::Status::HTTP_CODES->{fr_FR}->{429};
# same
say $Apache2::API::Status::HTTP_CODES->{fr}->{429};
# In Japanese: ãªã¯ã¨ã¹ãéå¤§ã§æå¦ãã
say $Apache2::API::Status::HTTP_CODES->{ja_JP}->{429};
# same
say $Apache2::API::Status::HTTP_CODES->{ja}->{429};
# In Korean: ë무 ë§ì ìì²
say $Apache2::API::Status::HTTP_CODES->{ko_KR}->{429};
# same
say $Apache2::API::Status::HTTP_CODES->{ko}->{429};
# In Russian: ÑлиÑком много запÑоÑов
say $Apache2::API::Status::HTTP_CODES->{ru_RU}->{429};
# same
say $Apache2::API::Status::HTTP_CODES->{ru}->{429};
# In simplified Chinese: 太å¤è¯·æ±
say $Apache2::API::Status::HTTP_CODES->{zh_CN}->{429};
# In Taiwanese (traditional) Chinese: 太å¤è«æ±
say $Apache2::API::Status::HTTP_CODES->{zh_TW}->{429};
But maybe more simply:
my $status = Apache2::API::Status->new;
say $status->status_message( 429 => 'ja_JP' );
# Or without the language code parameter, it will default to en_GB
say $status->status_message( 429 );
# Is success
say $status->is_info( 102 ); # true
say $status->is_success( 200 ); # true
say $status->is_redirect( 302 ); # true
say $status->is_error( 404 ); # true
say $status->is_client_error( 403 ); # true
say $status->is_server_error( 501 ); # true
=head1 VERSION
v0.2.1
=head1 DESCRIPTION
This module 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_CN (simplified Ch...
It also provides some functions to check if a given code is an information, success, redirect, error, client error or server error code.
It provides a full set of constants to use and import.
Finally, it adds a few more C<Apache2::Const>. See L</CONSTANTS> below.
=head1 METHODS
=head2 init
Creates an instance of L<Apache2::API::Status> and returns the object.
=head2 convert_short_lang_to_long
Given a 2 characters language code (not case sensitive) and this will return its iso 639 5 characters equivalent for supported languages.
For example:
Apache2::API::Status->convert_short_lang_to_long( 'zh' );
# returns: zh_TW
=head2 is_cacheable_by_default
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 Conte...
=head2 is_client_error
Returns true if the 3-digits code provided is between 400 and 500
=head2 is_error
Returns true if the 3-digits code provided is between 400 and 600
=head2 is_info
Returns true if the 3-digits code provided is between 100 and 200
=head2 is_redirect
Returns true if the 3-digits code provided is between 300 and 400
=head2 is_server_error
Returns true if the 3-digits code provided is between 500 and 600
=head2 is_success
Returns true if the 3-digits code provided is between 200 and 300
=head2 status_message
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.
This is useful to provide response to error in the user preferred language. L<Apache2::API/reply> uses it to set a json response with the HTTP error code along with a localised status message.
If no language code is provided, this will default to C<en_GB>.
See L</supported_languages> for the supported languages.
=head2 status_to_type
Provided with a status code, such as C<404>, and this returns a status type such as C<not_found>.
This is used to build a rfc9457 compliant error.
=head2 supported_languages
This will return a sorted array reference of support languages for status codes.
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).
Feel free to contribute those codes in other languages.
=head1 CONSTANTS
The following constants can be exported. You can use the C<:all> tag to export them all, such as:
use Apache2::API::Status qw( :all );
or you can use the tag C<:common> to export the following common status codes:
HTTP_NETWORK_AUTHENTICATION_REQUIRED
HTTP_FORBIDDEN
HTTP_NOT_FOUND
HTTP_OK
HTTP_TEMPORARY_REDIRECT
HTTP_INTERNAL_SERVER_ERROR
=head2 HTTP_CONTINUE (100)
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>
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 74...
PUT /some//big/file.mp4 HTTP/1.1
Host: www.example.org
Content-Type: video/mp4
Content-Length: 778043392
Expect: 100-continue
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.
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>
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.
=head2 HTTP_SWITCHING_PROTOCOLS (101)
See L<rfc7231, section 6.2.2|https://tools.ietf.org/html/rfc7231#section-6.2.2>
This is used to indicate that the TCP conncection is switching to a different protocol.
This is typically used for the L<WebSocket> protocol, which uses initially a HTTP handshake when establishing the connection. For example:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Origin: http://example.com
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
lib/Apache2/API/Status.pm view on Meta::CPAN
See L<rfc 7231, section 6.5.1|https://tools.ietf.org/html/rfc7231#section-6.5.1>
This is returned to indicate the client made a request the server could not interpret.
This is generally used as a fallback client-error code when other mode detailed C<4xx> code are not suitable.
=head2 HTTP_UNAUTHORIZED (401)
See L<rfc 7235, section 3.1 on Authentication|https://tools.ietf.org/html/rfc7235#section-3.1>
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401>
This is returned to indicate to the client it must authenticate first before issuing the request.
See also status code C<403 Forbidden> when client is outright forbidden from accessing the resource.
For example:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic; realm="Secured area"
or, for APIs:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer
or, combining both:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic; realm="Dev zone", Bearer
which equates to:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic; realm="Dev zone"
WWW-Authenticate: Bearer
So, for example, a user C<aladdin> with password C<opensesame> would result in the following request:
GET / HTTP/1.1
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
See also L<Mozilla documentation on Authorization header|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization>
=head2 HTTP_PAYMENT_REQUIRED (402)
See L<rfc 7231, section 6.5.2|https://tools.ietf.org/html/rfc7231#section-6.5.2>
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.
=head2 HTTP_FORBIDDEN (403)
See L<rfc 7231, section 6.5.3|https://tools.ietf.org/html/rfc7231#section-6.5.3>
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403>
This is returned to indicate the client is barred from accessing the resource.
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.
=head2 HTTP_NOT_FOUND (404)
See L<rfc 7231, section 6.5.4|https://tools.ietf.org/html/rfc7231#section-6.5.4>
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404>
This is returned to indicate the resource does not exist anymore.
=head2 HTTP_METHOD_NOT_ALLOWED (405)
See L<rfc 7231, section 6.5.5|https://tools.ietf.org/html/rfc7231#section-6.5.5>
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 a...
HTTP/1.1 405 Method Not Allowed
Content-Type: text/html
Content-Length: 32
Allow: GET, HEAD, OPTIONS, PUT
<h1>405 Try another method!</h1>
=head2 HTTP_NOT_ACCEPTABLE (406)
See L<rfc 7231, section 6.5.6|https://tools.ietf.org/html/rfc7231#section-6.5.6>
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/e...
For example:
GET /foo HTTP/1.1
Accept: application/json
Accept-Language: fr-FR,en-GB;q=0.8,fr;q=0.6,en;q=0.4,ja;q=0.2
HTTP/1.1 406 Not Acceptable
Server: Apache/2.4
Content-Type: text/html
<h1>Je ne gère pas le type application/json</h1>
Then, the server would response something like:
=head2 HTTP_PROXY_AUTHENTICATION_REQUIRED (407)
See L<rfc 7235, section 3.2 on Authentication|https://tools.ietf.org/html/rfc7235#section-3.2>
This is returned to indicate the proxy used requires authentication. This is similar to the status code C<401 Unauthorized>.
=head2 HTTP_REQUEST_TIME_OUT (408)
See L<rfc 7231, section 6.5.7|https://tools.ietf.org/html/rfc7231#section-6.5.7>
This is returned to indicate the request took too long to be received and timed out. For example:
HTTP/1.1 408 Request Timeout
Connection: close
Content-Type: text/plain
Content-Length: 19
Too slow! Try again
=head2 HTTP_CONFLICT (409)
See L<rfc 7231, section 6.5.8|https://tools.ietf.org/html/rfc7231#section-6.5.8>
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.
=head2 HTTP_GONE (410)
See L<rfc 7231, section 6.5.9|https://tools.ietf.org/html/rfc7231#section-6.5.9>
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:
HTTP/1.1 410 Gone
Server: Apache/2.4
Content-Type: text/plain
Content-Length: 30
The resource has been removed.
=head2 HTTP_LENGTH_REQUIRED (411)
See L<rfc 7231, section 6.5.10|https://tools.ietf.org/html/rfc7231#section-6.5.10>
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.
=head2 HTTP_PRECONDITION_FAILED (412)
See L<rfc 7232 on Conditional Request|https://tools.ietf.org/html/rfc7232>
This is returned when some preconditions set by the client could not be met.
For example:
Issuing a C<PUT> request for a document if it does not already exist.
PUT /foo/new-article.md HTTP/1.1
Content-Type: text/markdown
If-None-Match: *
Update a document if it has not changed since last time (etag)
PUT /foo/old-article.md HTTP/1.1
If-Match: "1345-12315"
Content-Type: text/markdown
If those failed, it would return something like:
HTTP/1.1 412 Precondition Failed
Content-Type: text/plain
Content-Length: 64
The article you are tring to update has changed since last time.
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:
PUT /foo/old-article.md HTTP/1.1
If-Match: "1345-12315"
Content-Type: text/markdown
Prefer: return=representation
### Article version 2.1
Then, the server would respond something like:
HTTP/1.1 412 Precondition Failed
Content-Type: text/markdown
Etag: "4444-12345"
Vary: Prefer
### Article version 3.0
( run in 1.129 second using v1.01-cache-2.11-cpan-39bf76dae61 )