emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Translation of http status code to text


From: Ted Zlatanov
Subject: Re: Translation of http status code to text
Date: Mon, 22 Mar 2010 12:06:04 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.91 (gnu/linux)

Here's one version of the HTTP codes as an alist.  I was thinking of
also generating defconst calls based on this list, that's why I named
everything "url-http-code-*".  But maybe that's not necessary and
accessor functions will be enough, so then we can s/url-http-code-//

Ted

=== modified file 'lisp/url/url-http.el'
--- lisp/url/url-http.el        2010-01-13 08:35:10 +0000
+++ lisp/url/url-http.el        2010-03-22 17:00:04 +0000
@@ -64,6 +64,56 @@
 nil will explicitly close the connection to the server after every
 request.")
 
+(defvar url-http-codes
+  "The HTTP return codes."
+  '(
+    (100 url-http-code-continue                        "Continue with request")
+    (101 url-http-code-switching-protocols             "Switching protocols")
+    (102 url-http-code-processing                      "Processing (Added by 
DAV)")
+    (200 url-http-code-OK                              "OК")
+    (201 url-http-code-created                         "Created")
+    (202 url-http-code-accepted                        "Accepted")
+    (203 url-http-code-non-authoritative               "Non-authoritative 
information")
+    (204 url-http-code-no-content                      "No content")
+    (205 url-http-code-reset-content                   "Reset content")
+    (206 url-http-code-partial-content                 "Partial content")
+    (207 url-http-code-multi-status                    "Multi-status (Added by 
DAV)")
+    (300 url-http-code-multiple-choices                "Multiple choices")
+    (301 url-http-code-moved-permanently               "Moved permanently")
+    (302 url-http-code-found                           "Found")
+    (303 url-http-code-see-other                       "See other")
+    (304 url-http-code-not-modified                    "Not modified")
+    (305 url-http-code-use-proxy                       "Use proxy")
+    (307 url-http-code-temporary-redirect              "Temporary redirect")
+    (400 url-http-code-bad-request                     "Bad Request")
+    (401 url-http-code-unauthorized                    "Unauthorized")
+    (402 url-http-code-payment-required                "Payment required")
+    (403 url-http-code-forbidden                       "Forbidden")
+    (404 url-http-code-not-found                       "Not found")
+    (405 url-http-code-method-not-allowed              "Method not allowed")
+    (406 url-http-code-not-acceptable                  "Not acceptable")
+    (407 url-http-code-proxy-authentication-required   "Proxy authentication 
required")
+    (408 url-http-code-request-timeout                 "Request time-out")
+    (409 url-http-code-conflict                        "Conflict")
+    (410 url-http-code-gone                            "Gone")
+    (411 url-http-code-length-required                 "Length required")
+    (412 url-http-code-precondition-failed             "Precondition failed")
+    (413 url-http-code-request-entity-too-large        "Request entity too 
large")
+    (414 url-http-code-request-uri-too-large           "Request-URI too large")
+    (415 url-http-code-unsupported-media-type          "Unsupported media 
type")
+    (416 url-http-code-requested-range-not-satisfiable "Requested range not 
satisfiable")
+    (417 url-http-code-expectation-failed              "Expectation failed")
+    (422 url-http-code-unprocessable-entity            "Unprocessable Entity 
(Added by DAV)")
+    (423 url-http-code-locked                          "Locked")
+    (424 url-http-code-failed-Dependency               "Failed Dependency")
+    (500 url-http-code-internal-server-error           "Internal server error")
+    (501 url-http-code-not-implemented                 "Not implemented")
+    (502 url-http-code-bad-gateway                     "Bad gateway")
+    (503 url-http-code-service-unavailable             "Service unavailable")
+    (504 url-http-code-gateway-timeout                 "Gateway time-out")
+    (505 url-http-code-http-version-not-supported      "HTTP version not 
supported")
+    (507 url-http-code-insufficient-storage            "Insufficient 
storage")))
+
 ;(eval-when-compile
 ;; These are all macros so that they are hidden from external sight
 ;; when the file is byte-compiled.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]