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: Wed, 24 Mar 2010 14:37:24 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87bpeda4uj.fsf@lifelogs.com> References: <87sk7vllgj.fsf@mail.jurta.org> <87hbo81onq.fsf@lifelogs.com> <87k4t4zb5l.fsf@lifelogs.com> <87r5ncxp4z.fsf@lifelogs.com> <87ljdkxj4m.fsf@lifelogs.com> <877hp3ibft.fsf@mail.jurta.org> <87ocifxerj.fsf@lifelogs.com> <6bfx3ppqr5.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1269459990 27787 80.91.229.12 (24 Mar 2010 19:46:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 24 Mar 2010 19:46:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 24 20:46:26 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 1NuWX3-0005A9-Kb for ged-emacs-devel@m.gmane.org; Wed, 24 Mar 2010 20:46:25 +0100 Original-Received: from localhost ([127.0.0.1]:34631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuWX2-0002AE-TC for ged-emacs-devel@m.gmane.org; Wed, 24 Mar 2010 15:46:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuWTp-0001sa-OW for emacs-devel@gnu.org; Wed, 24 Mar 2010 15:43:05 -0400 Original-Received: from [140.186.70.92] (port=35489 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuWTm-0001r5-Rt for emacs-devel@gnu.org; Wed, 24 Mar 2010 15:43:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuWOi-0000Qg-3u for emacs-devel@gnu.org; Wed, 24 Mar 2010 15:37:49 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:52368) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuWOh-0000QP-Nt for emacs-devel@gnu.org; Wed, 24 Mar 2010 15:37:48 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NuWOb-0000Ut-70 for emacs-devel@gnu.org; Wed, 24 Mar 2010 20:37:41 +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 ; Wed, 24 Mar 2010 20:37:41 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Mar 2010 20:37:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 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/24.0.50 (gnu/linux) Cancel-Lock: sha1:0YcDdm0+7Hr3eJFPBpaQy25qyjc= 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:122622 Archived-At: --=-=-= On Wed, 24 Mar 2010 13:35:10 -0400 Glenn Morris wrote: GM> + ;; other status symbols: jewelry and luxury cars GM> + (status-symbol (cadr (assq status-number url-http-codes)))) GM> `status-number' doesn't seem to be defined anywhere; should it be GM> url-http-response-status ? Sorry about that, I had the right version but screwed up the commit. I can't commit currently but maybe you could? The (trivial) patch is below. Thanks Ted --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=url-http-status.patch === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2010-03-24 09:30:28 +0000 +++ lisp/url/ChangeLog 2010-03-24 19:29:55 +0000 @@ -1,5 +1,9 @@ 2010-03-24 Teodor Zlatanov + * url-http.el (url-http-parse-headers): Fix wrong variable name. + +2010-03-24 Teodor Zlatanov + * url-http.el (url-http-codes): New variable to hold a mapping of HTTP status codes' numbers, their symbolic name, and their text. (url-http-parse-headers): Use it, leaving the original numeric === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2010-03-24 09:30:28 +0000 +++ lisp/url/url-http.el 2010-03-24 19:29:08 +0000 @@ -486,7 +486,7 @@ (class nil) (success nil) ;; other status symbols: jewelry and luxury cars - (status-symbol (cadr (assq status-number url-http-codes)))) + (status-symbol (cadr (assq url-http-response-status url-http-codes)))) (setq class (/ url-http-response-status 100)) (url-http-debug "Parsed HTTP headers: class=%d status=%d" class url-http-response-status) (url-http-handle-cookies) --=-=-=--