From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Takafumi Arakaki Newsgroups: gmane.emacs.bugs Subject: bug#11469: 24.1.50; url-retrieve with PUT method fails every two times Date: Mon, 14 May 2012 13:31:05 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1337011706 27337 80.91.229.3 (14 May 2012 16:08:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 May 2012 16:08:26 +0000 (UTC) To: 11469@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 14 18:08:23 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1STxom-0007AD-DE for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 May 2012 18:08:16 +0200 Original-Received: from localhost ([::1]:60715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STxol-0007L6-N5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 May 2012 12:08:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STxoI-00079x-G9 for bug-gnu-emacs@gnu.org; Mon, 14 May 2012 12:07:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STxoD-0004zN-5q for bug-gnu-emacs@gnu.org; Mon, 14 May 2012 12:07:46 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STxoC-0004zA-Uk for bug-gnu-emacs@gnu.org; Mon, 14 May 2012 12:07:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1STxoY-0002ah-D3 for bug-gnu-emacs@gnu.org; Mon, 14 May 2012 12:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Takafumi Arakaki Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 May 2012 16:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11469 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13370116689936 (code B ref -1); Mon, 14 May 2012 16:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 May 2012 16:07:48 +0000 Original-Received: from localhost ([127.0.0.1]:53027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1STxny-0002Zc-Oa for submit@debbugs.gnu.org; Mon, 14 May 2012 12:07:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38844) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1STtVb-0004Hh-Vi for submit@debbugs.gnu.org; Mon, 14 May 2012 07:32:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STtV6-0007QK-8G for submit@debbugs.gnu.org; Mon, 14 May 2012 07:31:45 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:33363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STtV6-0007QE-2U for submit@debbugs.gnu.org; Mon, 14 May 2012 07:31:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STtUz-0000Jk-SR for bug-gnu-emacs@gnu.org; Mon, 14 May 2012 07:31:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STtUu-0007OW-2k for bug-gnu-emacs@gnu.org; Mon, 14 May 2012 07:31:33 -0400 Original-Received: from mail-qc0-f169.google.com ([209.85.216.169]:55360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STtUt-0007O4-RN for bug-gnu-emacs@gnu.org; Mon, 14 May 2012 07:31:27 -0400 Original-Received: by qcsd16 with SMTP id d16so3825103qcs.0 for ; Mon, 14 May 2012 04:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=D0IQt3e6RmIf0RwgBa52l+NN3ER0yx+yHJTcchkb+7M=; b=fR04pJbvy/b5boQx4eYedAPsTJ0xxXrpCveQKMpCATZGngiScrVifiVvKvB3ZWTdDS s70e4Kh2BIooBoLApwvq/nCy/hQDCc9ZkCJdV+ufAIiJJjrS37ZqU3E1TMpQPlrNan3q dKLarb4gUG8Rwji7LBR4JU0Lo7/qpcFtfzZxnUQmXF/ak8V4B5Vkc/TkgkjNmLltvY7V gdI6pH6/OJz6BghqnqVm0ciT8g5fHU0KLD74embT038cj9TBlGzXlVRKRb7gyYBgzd2K oPPYgB7iJ6e6bTSb5kh/HBJq+/lXQ5E7KXqKD5icrV4kb8MOpFLUp6xVSdqabxVpfkK9 x5FQ== Original-Received: by 10.224.183.135 with SMTP id cg7mr12058281qab.25.1336995085232; Mon, 14 May 2012 04:31:25 -0700 (PDT) Original-Received: by 10.224.137.72 with HTTP; Mon, 14 May 2012 04:31:05 -0700 (PDT) X-Google-Sender-Auth: zF0cKzbIe9m4eFtBcEEOvOuKKck X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 14 May 2012 12:07:25 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Mon, 14 May 2012 12:08:13 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60011 Archived-At: This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgement at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': I found some probelem using url-retrieve. To reproduce the probelem you can use the following snippet: (let ((url "http://127.0.0.1:9999/") (url-request-method "PUT") (url-request-extra-headers '(("Content-Type" . "application/json"))) (url-request-data "[1 2 3]")) (url-retrieve url (lambda (status)))) I am executing the above snippet (using eval-last-sexp at the end of the exnippet) and it fails every two times (it succeeds and then fails and then succeeds and then ...). I got this message when it fails: error in process sentinel: url-http-end-of-document-sentinel: Symbol's value as variable is void: url-request-method error in process sentinel: Symbol's value as variable is void: url-request-method I checked above with emacs started by emacs-snapshot -Q. Furthremore, in some case I have url-request-method set to nil at global lavel (M-: url-request-method RET gives nil). And in this case, GET method is used instead. I guess this is because of "(or url-request-method "GET")" in url-http. I guess it won't matter, but I am using Python tornado as a web server to check the behavior. This is the test server I am using: import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): print "GET" print self.request.body self.write("Hello, world") self.finish() def put(self): print "PUT" print self.request.body self.set_status(204) self.finish() application = tornado.web.Application([ (r"/", MainHandler), ]) if __name__ == "__main__": application.listen(9999) tornado.ioloop.IOLoop.instance().start() If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/24.1.50/etc/DEBUG. In GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) of 2012-04-10 on mercury, modified by Debian (emacs-snapshot package, version 2:20120410-1~ppa1~maverick1) Windowing system distributor `The X.Org Foundation', version 11.0.10900000 Configured using: `configure '--build' 'i686-linux-gnu' '--host' 'i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib//' '--with-x=yes' '--with-x-toolkit=gtk' '--with-imagemagick=yes' 'build_alias=i686-linux-gnu' 'host_alias=i686-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed -znocombreloc' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f C-y C-x C-f p C-x b C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-e C-n C-n C-n C-n C-n C-n C-n C-n C-n C-e C-x C-e C-x C-e C-x C-e C-e C-f C-p C-p C-p C-p C-p C-p C-p C-p C-p M-m C-p C-f C-p C-s C-w C-w C-w C-s C-s C-n C-a C-n C-n C-n C-n C-n C-n C-n C-n C-e C-n C-e C-x C-e C-x C-e C-n C-p C-n C-n C-e C-p C-e C-p C-p C-e C-p C-p C-p C-p C-e C-p C-e C-n C-n C-n C-n C-n C-n C-n C-n C-n C-e C-p C-e M-x e b u g - r e e m a b C-g M-x r e p o r Recent messages: (buffer-string) = HTTP/1.1 204 No Content Content-Length: 0 Content-Type: text/html; charset=UTF-8 Server: TornadoServer/2.2 [2 times] byte-code: End of buffer [2 times] Making completion list... Quit Making completion list... [2 times] Load-path shadows: /usr/share/emacs/24.1.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/24.1.50/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.1.50/lisp/textmodes/rst Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail help-mode view multi-isearch mail-utils network-stream starttls url-http tls mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util password-cache url-vars mm-util mail-prsvr mailcap python-21 python easymenu comint regexp-opt ansi-color ring time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)