From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 141D6779C1 for ; Wed, 4 Sep 2019 07:08:46 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id z11so21432276wrt.4 for ; Wed, 04 Sep 2019 07:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DdsXgw7ZBaYSAsJ8bLayGLa/YyFoIAMoQ3UywEJLpp0=; b=YavlJ8Ck5jkB7UaPvlZqQ3V8w5NqQQBNmpwHcLGr/UnulmWvkloMwBP1PUck6rWpmB UbnCm1LKuUT8/b19m5BEuoFjFNdZxPhQDk1E9bf7H3d4eqyWO3RixojzX+Iqe/IMbkCv ruo32IKvmAoh8KE74nMt8JoseagfKjZxKyMGInB5QqJTiUkQsgM8enxg6K51K0Fz4p44 Q7k7SdBTsSBIn3WfO1bhX80pm8jTYz/+RHPUW6oYreWWwhmB77y8O+SDAbGYKNf1UWE0 3aAy09vgFxkaPN8bKqF6BKOSU+9izZNL2A7O2E3HY8TxrrHRkXt7Io9laMC28Emlu42o AxoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DdsXgw7ZBaYSAsJ8bLayGLa/YyFoIAMoQ3UywEJLpp0=; b=kqJiDDv8PpR3KbTfpJa/HdfoAOyqDXC8wyMAMeYuJyFPseotxmBPJBIxG7qo28DeWw fE6TuOylarGiE48SEHPiztTcV78GPk7U9LTx1kfZz+j+ylHpxEsJxa2alUBEG8EluhsO CJ5xbk60LB+/0RK2g2jjkRiRtD+m2xjCShMrGOEMLf0dPr1v/ErJRkKkCRSCPS5yjbqq e+CsZZ7EBc/O6zTImiOb7vuQzXGBPJQfX3d5Skc/JSYHU1XEET3Ex8baiU2Wt11AIzC5 7+7n6CFHrbGbTwCthG0U5kkFKBhM3omV7XkH3++6kQGurxHy5XrZp82TTCgejRTAhAPr XAnw== X-Gm-Message-State: APjAAAXNPlIR4fx7qXko2sLQRYkhbQI1F0JLTAyVc4+OOvTdbP5fpPhs 6MFRcbYKtH/DX1WUaSOh9q8= X-Google-Smtp-Source: APXvYqw3hmQmzY0atCGsi7VXELLxlAVaZymwRlCItGGjld8swfdxlPfqoN3TyJGxafdYAo6xr1yGfA== X-Received: by 2002:adf:c5cc:: with SMTP id v12mr18630716wrg.149.1567606124465; Wed, 04 Sep 2019 07:08:44 -0700 (PDT) Received: from toaster (a.5.9.3.b.f.e.f.f.f.4.4.2.d.a.2.2.4.0.9.2.4.1.1.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1142:9042:2ad2:44ff:fefb:395a]) by smtp.gmail.com with ESMTPSA id f24sm2858603wmc.25.2019.09.04.07.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 07:08:43 -0700 (PDT) Date: Wed, 4 Sep 2019 15:08:37 +0100 From: Adam Thompson To: Karl Dahlke Cc: edbrowse-dev@edbrowse.org Subject: Re: [edbrowse-dev] Another curl question Message-ID: <20190904140837.GA6282@toaster> References: <20190803161036.eklhad@comcast.net> X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190803161036.eklhad@comcast.net> User-Agent: Mutt/1.10.1 (2018-07-13) On Tue, Sep 03, 2019 at 04:10:36PM -0400, Karl Dahlke wrote: > This happens on my relatively old machine and on a newer machine. > > In edbrowse and with db4 > > e http://iyfsearch.com/px.js?ch=2 > > It asks if you want to download, just hit space to pull it into memory. > It is a regular fetch and it goes into cache. No problem. > > Quit edbrowse and bring it up again. db4 and do the same thing. > > e http://iyfsearch.com/px.js?ch=2 > > It sees it in cache and just does a head request. > The server should give you the same etag and you pull it out of cache, but, > curl says "could not read the data from the server" > Thus the file is not fetched at all > It looks like we get all the right stuff from the server. > > What gives? On my machine (Debian sid updated as of... a few days ago I think): curl --head -vv http://iyfsearch.com/px.js?ch=2 * Trying 208.91.196.46:80... * TCP_NODELAY set * Connected to iyfsearch.com (208.91.196.46) port 80 (#0) > HEAD /px.js?ch=2 HTTP/1.1 > Host: iyfsearch.com > User-Agent: curl/7.65.3 > Accept: */* > * Recv failure: Connection reset by peer * Closing connection 0 curl: (56) Recv failure: Connection reset by peer curl --version curl 7.65.3 (x86_64-pc-linux-gnu) libcurl/7.65.3 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.39.2 librtmp/2.3 Release-Date: 2019-07-19 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets > What happens when other browsers issue head requests? Dunno, but my guess is this site'll reset the connection on them as well... very odd. However, in my experience (my day job is developing a web security service) there are some very odd HTTP implementations out there. My guess is that server simply cannot handle HEAD requests and, rather than speaking correct HTTP, just drops the connection. That being said, it may be worth trying with a different user agent (I've seen that kind of oddness before as well). Cheers, Adam.