From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#35927: 26.2; url-http-end-of-headers sets to 1 when cache is working Date: Mon, 27 May 2019 16:21:48 +0100 Message-ID: <87ef4jrkhf.fsf@tcd.ie> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="31008"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35927@debbugs.gnu.org To: Xu Chunyang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 27 17:23:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVHT1-0007t3-7n for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 May 2019 17:23:15 +0200 Original-Received: from localhost ([127.0.0.1]:47150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVHT0-0006uO-5U for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 May 2019 11:23:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVHSu-0006u7-5Y for bug-gnu-emacs@gnu.org; Mon, 27 May 2019 11:23:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVHSp-0001dy-ND for bug-gnu-emacs@gnu.org; Mon, 27 May 2019 11:23:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40257) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVHSo-0001cj-JB for bug-gnu-emacs@gnu.org; Mon, 27 May 2019 11:23:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hVHSo-0000gJ-Ca for bug-gnu-emacs@gnu.org; Mon, 27 May 2019 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 May 2019 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35927 X-GNU-PR-Package: emacs Original-Received: via spool by 35927-submit@debbugs.gnu.org id=B35927.15589705222489 (code B ref 35927); Mon, 27 May 2019 15:23:02 +0000 Original-Received: (at 35927) by debbugs.gnu.org; 27 May 2019 15:22:02 +0000 Original-Received: from localhost ([127.0.0.1]:53801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hVHRn-0000dw-Qs for submit@debbugs.gnu.org; Mon, 27 May 2019 11:22:00 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:52162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hVHRl-0000dh-QX for 35927@debbugs.gnu.org; Mon, 27 May 2019 11:21:58 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id f10so9024211wmb.1 for <35927@debbugs.gnu.org>; Mon, 27 May 2019 08:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=is5OMSHj/QKxbJ4GqWWQkV6AMulugbU6/XDCagM3Pyw=; b=yEm//E60KdFSzhlqpNEVHX/Ae+PAX0S/VJXw0+NuirDBI61HYoRi4l6ditCHWPi/oC GU7Ecvr12bz7GMEie98s3mhqVmEcT0RIcycBpd/Gw1X4USNCiOe4iQGTjIQX2/PwPfML 30vPyNprWyzoXGUh4tu+OWq27PFVxneoCiGTFj5R9XFmzMgxvVd5Wf2VTUfqg9bL4AsJ 38F2UAimiME88LHbBrOz362DaoZVlAiXem9T8zbJQ5GGWSwTIN4dt7pZouaCnF4ZDCe0 cyPBhE/CdNQvvMeZ+VqDzsIymo1Ei1c6HddLpoVLr0R7uPKyy9hSx375uhHQr4AhLmnL 9xaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=is5OMSHj/QKxbJ4GqWWQkV6AMulugbU6/XDCagM3Pyw=; b=rW0HXQXCIoyErIgoCQvVny7yI7l6XzItm40FXcyAurZZx+J5AXp2HnJPwbLrZAXkB8 BwjCtgdUEuxEb+Gkq8Hg1kg9wxIJcCh0roE7/t/isLJ6nTLFGOlBTvG6Zh81dnilQFyG S0bexQ1EGfWddwlLyc6QxVa6NbSSXCK/qa1UJXM+1ibcBjTytokThHOiZ37ZNzeZwFGF wCHtul+P+fBFWYfqg/2ixIlnFdSObyTgVFHLYL3BGQlO3au54m4vSC+cD7FC6zmGdlrc CMaMYvtiI74j4bQqdrDeFtismIHg8gZI1vqtdjHJ1vK3aLXf2WPoTiGIoAh3vANLa0qk CGXg== X-Gm-Message-State: APjAAAVpHAkpMFTd0XfTMdECVq0yPyVurkemQ1nxp8d7joTyKxYKC9cu gyDum3692puUJFgLa6UhAGNUgljP0JWLcw== X-Google-Smtp-Source: APXvYqyBpPM4o5PMboHfkG1NBUCcUgORH7gVN9s6WBelWEjZN+nrx2XnLNaoDkRCOEIQV08OOIjLrw== X-Received: by 2002:a1c:2dc2:: with SMTP id t185mr10397372wmt.52.1558970511715; Mon, 27 May 2019 08:21:51 -0700 (PDT) Original-Received: from localhost ([163.172.211.46]) by smtp.gmail.com with ESMTPSA id w2sm4911556wru.16.2019.05.27.08.21.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 27 May 2019 08:21:50 -0700 (PDT) In-Reply-To: (Xu Chunyang's message of "Mon, 27 May 2019 22:47:15 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" Xref: news.gmane.org gmane.emacs.bugs:159814 Archived-At: Xu Chunyang writes: > Today I enable URL cache via > > (setq url-automatic-caching t > url-cache-expire-time (* 6 3600)) > > and I notice url-http-end-of-headers isn't the end of the headers when > cache is working. This breaks some of my code, I assume it is the end of > the header so I use (goto-char url-http-end-of-headers) before parsing > the response body. Is this expected or a bug? > > (with-current-buffer (url-retrieve-synchronously "http://example.com") > (message "=> %S" url-http-end-of-headers)) > "=> #" > > (with-current-buffer (url-retrieve-synchronously "http://example.com") > (message "=> %S" url-http-end-of-headers)) > "=> #" > > (with-current-buffer (url-retrieve-synchronously "http://example.com") > (message "=> %S" url-http-end-of-headers)) > "=> #" I can't seem to reproduce this on emacs-26 or master: 0. HOME=$(mktemp -d) emacs -Q 1. (let ((get (lambda () (with-current-buffer (url-retrieve-synchronously "https://gnu.org") (message "%s" url-http-end-of-headers))))) (dotimes (_ 3) (funcall get)) (setq url-automatic-caching t url-cache-expire-time (* 6 3600)) (dotimes (_ 3) (funcall get))) 2. C-x C-e Contacting host: gnu.org:443 # Contacting host: gnu.org:443 # # Contacting host: gnu.org:443 # # # What am I doing wrong? -- Basil In GNU Emacs 26.2.50 (build 8, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2019-05-27 built on thunk Repository revision: c4d4dcf17e407a3c68e150f22b9756ef6c943070 Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 System Description: Debian GNU/Linux 10 (buster) Configured using: 'configure 'CC=ccache gcc' 'CFLAGS=-O0 -g3 -ggdb -gdwarf-4' --config-cache --prefix=/home/blc/.local --program-suffix=26 --enable-checking=yes,glyphs --enable-check-lisp-object-type --with-mailutils --with-x-toolkit=lucid --with-modules --with-file-notification=yes --with-x' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_IE.UTF-8 locale-coding-system: utf-8-unix In GNU Emacs 27.0.50 (build 6, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2019-05-25 built on thunk Repository revision: ec4b2c888ad12c255accf1bccdac12f173c96047 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 System Description: Debian GNU/Linux 10 (buster) Configured using: 'configure 'CC=ccache gcc' 'CFLAGS=-O2 -march=native' --config-cache --prefix=/home/blc/.local --with-mailutils --with-x-toolkit=lucid --with-modules --with-file-notification=yes --with-x' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP