From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Translation of http status code to text Date: Mon, 22 Mar 2010 12:06:04 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87r5ncxp4z.fsf@lifelogs.com> References: <87sk7vllgj.fsf@mail.jurta.org> <87hbo81onq.fsf@lifelogs.com> <87k4t4zb5l.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1269278270 424 80.91.229.12 (22 Mar 2010 17:17:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Mar 2010 17:17:50 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 22 18:17:46 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NtlG5-0006lV-Jn for ged-emacs-devel@m.gmane.org; Mon, 22 Mar 2010 18:17:46 +0100 Original-Received: from localhost ([127.0.0.1]:36269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NtlG4-0007ia-CA for ged-emacs-devel@m.gmane.org; Mon, 22 Mar 2010 13:17:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NtlCA-00066g-1S for emacs-devel@gnu.org; Mon, 22 Mar 2010 13:13:42 -0400 Original-Received: from [140.186.70.92] (port=40102 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NtlC8-0005zt-CY for emacs-devel@gnu.org; Mon, 22 Mar 2010 13:13:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ntl5V-0000Kq-QP for emacs-devel@gnu.org; Mon, 22 Mar 2010 13:06:50 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:43232) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ntl5V-0000KZ-GZ for emacs-devel@gnu.org; Mon, 22 Mar 2010 13:06:49 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ntl5S-0008Mk-El for emacs-devel@gnu.org; Mon, 22 Mar 2010 18:06:46 +0100 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Mar 2010 18:06:46 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Mar 2010 18:06:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 68 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.91 (gnu/linux) Cancel-Lock: sha1:2VpGQ6JOuYTEaNEQ+d/N7YYGmRA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:122490 Archived-At: 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.