Re: [Tools-discuss] Why does xml2rfc download over HTTP?

Henrik Levkowetz <henrik@levkowetz.com> Tue, 05 February 2019 19:18 UTC

Return-Path: <henrik@levkowetz.com>
X-Original-To: tools-discuss@ietfa.amsl.com
Delivered-To: tools-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 467AD130ED8 for <tools-discuss@ietfa.amsl.com>; Tue, 5 Feb 2019 11:18:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s6EzMXRMZxqv for <tools-discuss@ietfa.amsl.com>; Tue, 5 Feb 2019 11:18:05 -0800 (PST)
Received: from zinfandel.tools.ietf.org (zinfandel.tools.ietf.org [IPv6:2001:1890:126c::1:2a]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 02FD6130ECD for <tools-discuss@ietf.org>; Tue, 5 Feb 2019 11:18:05 -0800 (PST)
Received: from h-202-242.a357.priv.bahnhof.se ([158.174.202.242]:56426 helo=tannat.localdomain) by zinfandel.tools.ietf.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <henrik@levkowetz.com>) id 1gr6EN-0008FZ-Sj; Tue, 05 Feb 2019 11:18:04 -0800
To: Carsten Bormann <cabo@tzi.org>, Richard Barnes <richard.barnes@gmail.com>
References: <CABcZeBPC8SsaFpRDarRDyHX0V6tW56QC_J56ziKAz_ya9fmy4A@mail.gmail.com> <CACB24MtLzNKNKwdNQbuna8HDbZR1NRuUJFsoRWYHUM+T_s6Rpw@mail.gmail.com> <098AAA72-450A-4376-983F-57F0C667C212@tzi.org>
Cc: tools-discuss <tools-discuss@ietf.org>
From: Henrik Levkowetz <henrik@levkowetz.com>
Message-ID: <0ee1c021-b920-b7b9-b126-db5ea27ec3c6@levkowetz.com>
Date: Tue, 05 Feb 2019 20:17:56 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <098AAA72-450A-4376-983F-57F0C667C212@tzi.org>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="PI1fubXIEO7Si3OHsmETaO0WJ4jNHUe2v"
X-SA-Exim-Connect-IP: 158.174.202.242
X-SA-Exim-Rcpt-To: tools-discuss@ietf.org, richard.barnes@gmail.com, cabo@tzi.org
X-SA-Exim-Mail-From: henrik@levkowetz.com
X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000)
X-SA-Exim-Scanned: Yes (on zinfandel.tools.ietf.org)
X-Clacks-Overhead: GNU Terry Pratchett
Archived-At: <https://mailarchive.ietf.org/arch/msg/tools-discuss/xnZ9DqtNrvaojLlY3YY6uDV9W80>
Subject: Re: [Tools-discuss] Why does xml2rfc download over HTTP?
X-BeenThere: tools-discuss@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF Tools Discussion <tools-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tools-discuss/>
List-Post: <mailto:tools-discuss@ietf.org>
List-Help: <mailto:tools-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Feb 2019 19:18:07 -0000

Hi,

On 2019-02-02 14:37, Carsten Bormann wrote:
> Right. However, who ever fixes this should keep in mind that software
> installed on a laptop does not always have access to a good set of
> root certificates (the browser is likely to, but Python software may
> not have access to the browser set), so it would be useful to have an
> escape hatch of some kind (preferably through environment variables,
> so complex Makefiles don’t have to be touched).
> 
> Maybe adding a little bit of robustness to the download process
> (e.g., don’t cache it if it isn’t valid XML) would also help.

Yes, that makes sense.  Added in my sources, will be part of the next
release.

Thanks, and best regards,

	Henrik

> 
> Grüße, Carsten
> 
> 
>> On Feb 1, 2019, at 23:40, Richard Barnes <richard.barnes@gmail.com> wrote:
>> 
>> In particular, this seems to be the patch necessary to resolve the issue:
>> 
>> Index: trunk/cli/xml2rfc/parser.py
>> ===================================================================
>> --- trunk/cli/xml2rfc/parser.py	(revision 2965)
>> +++ trunk/cli/xml2rfc/parser.py	(working copy)
>> @@ -53,8 +53,6 @@
>>                   no_network=None, network_locs= [
>>                       'https://xml2rfc.ietf.org/public/rfc/',
>>                       'https://xml2rfc.tools.ietf.org/public/rfc/',
>> -                     'http://xml2rfc.ietf.org/public/rfc/',
>> -                     'http://xml2rfc.tools.ietf.org/public/rfc/',
>>                   ],
>>                   rfc_number=None, options=base.default_options):
>>          self.quiet = quiet if quiet != None else options.quiet
>> 
>> On Fri, Feb 1, 2019 at 5:08 PM Eric Rescorla <ekr@rtfm.com> wrote:
>> Hi folks,
>> 
>> I recently went to build a draft and got a pile of errors about how the references didn't parse. Digging into things a bit, I discovered that the reference was the page from a captive portal on one of my flights. I'm not sure how this happened, but looking at xml2rfc, it appears that it tries HTTPS URIs and then HTTP URIs, which seems like it's going to have the wrong outcome in the situation where the captive portal blocks HTTPS and intercepts HTTP.
>> 
>> Is there a good reason to continue to allow HTTP URIs in the tool?
>> 
>> -Ekr
>> 
>> 
>> 
>> 
>> ___________________________________________________________
>> Tools-discuss mailing list
>> Tools-discuss@ietf.org
>> https://www.ietf.org/mailman/listinfo/tools-discuss
>> 
>> Please report datatracker.ietf.org and mailarchive.ietf.org
>> bugs at http://tools.ietf.org/tools/ietfdb
>> or send email to datatracker-project@ietf.org
>> 
>> Please report tools.ietf.org bugs at
>> http://tools.ietf.org/tools/issues
>> or send email to webmaster@tools.ietf.org
>> ___________________________________________________________
>> Tools-discuss mailing list
>> Tools-discuss@ietf.org
>> https://www.ietf.org/mailman/listinfo/tools-discuss
>> 
>> Please report datatracker.ietf.org and mailarchive.ietf.org
>> bugs at http://tools.ietf.org/tools/ietfdb
>> or send email to datatracker-project@ietf.org
>> 
>> Please report tools.ietf.org bugs at
>> http://tools.ietf.org/tools/issues
>> or send email to webmaster@tools.ietf.org
> 
> ___________________________________________________________
> Tools-discuss mailing list
> Tools-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/tools-discuss
> 
> Please report datatracker.ietf.org and mailarchive.ietf.org
> bugs at http://tools.ietf.org/tools/ietfdb
> or send email to datatracker-project@ietf.org
> 
> Please report tools.ietf.org bugs at
> http://tools.ietf.org/tools/issues
> or send email to webmaster@tools.ietf.org
>