From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0MP2M4PmZF+8DQAA0tVLHw (envelope-from ) for ; Fri, 18 Sep 2020 16:55:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +MrpL4PmZF9iYwAA1q6Kng (envelope-from ) for ; Fri, 18 Sep 2020 16:55:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 520F19404C7 for ; Fri, 18 Sep 2020 16:55:31 +0000 (UTC) Received: from localhost ([::1]:36316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJJfW-0002pl-4b for larch@yhetil.org; Fri, 18 Sep 2020 12:55:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJJXF-0004Mb-Vp for guix-devel@gnu.org; Fri, 18 Sep 2020 12:46:58 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:64510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJJXE-0001Ao-17 for guix-devel@gnu.org; Fri, 18 Sep 2020 12:46:57 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 2F67E7196A; Fri, 18 Sep 2020 12:46:53 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=SU1H34saUd9iUc2fVBCtdD7ZELk=; b=bkSUen nJc0zhR0Pv/YZUBmoCBLXi7neqFVs+DGxytaFKjAMpKd7bviPoCFjgC56UgCPFWW kaoXgUn6+7Q+ZnwLZFSa2R/HSM8qeyJSv7mu9PnyCwvCD3sx4cn2CZGH7OJLkap9 zKZLH/6ZWdfCBq55dYRZ8vgUqx4YrHx8H8G8g= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 281CE71969; Fri, 18 Sep 2020 12:46:53 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=s5A0TEvv9uWAAjJ7XFYLE6cGH6cv3BxtntwkYZKbzrU=; b=2S9uRMqJ9iMKtP0AvId1IInARJLJxKRV439fawmUf0FQOYwpXF3fQQXWND2cmrLoWcqrvQ7WMy8PR2cy0hJxYFTyCdUj/u4r+bS36YLb3MQ0wG3F1YPNU+miopLrabuPXcJas3CO5DEbgy10N+XZhZIlGFFf4xZwDnyND1CGFLs= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 8C44671968; Fri, 18 Sep 2020 12:46:52 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: zimoun Subject: Re: Mummi wishlist: API using Message-ID In-Reply-To: <875z8bkaf8.fsf@kyleam.com> References: <86sgbhz3fe.fsf@gmail.com> <87ft7gvi1h.fsf@elephly.net> <875z8bkaf8.fsf@kyleam.com> Date: Fri, 18 Sep 2020 12:46:51 -0400 Message-ID: <87r1qzc9s4.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 8DCE04B8-F9CE-11EA-8EF6-2F5D23BA3BAF-24757444!pb-smtp2.pobox.com Received-SPF: pass client-ip=64.147.108.71; envelope-from=kyle@kyleam.com; helo=pb-smtp2.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 12:46:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=pobox.com header.s=sasl header.b=bkSUen n; dkim=fail (rsa verify failed) header.d=kyleam.com header.s=mesmtp header.b=2S9uRMqJ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: xrStOVo0HrPz Kyle Meyer writes: > For public-inbox URLs, there is one character that needs to be escaped: > "/" with "%2F" (see ). Correcting myself: I shouldn't take that help page as a complete description of what needs to be escaped for public-inbox URLs. It'd be better to look at what public-inbox's code does itself, particularly when it generates the path component of the URL for its Archived-At header. It feeds the message ID through this function: ,----[ lib/PublicInbox/MID.pm ] | # RFC3986, section 3.3: | sub MID_ESC () { '^A-Za-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@' } | sub mid_escape ($) { uri_escape_utf8($_[0], MID_ESC) } `---- That code came with 9d1e5fad (www: do not unecessarily escape some chars in paths, 2016-08-14). So, if you want to perform the same escaping for your custom Elisp function that generates public-inbox URLs, you can do something like this: (let ((unreserved-chars (append url-unreserved-chars '(?! ?$ ?& ?' ?\( ?\) ?* ?+ ?, ?= ?: ?@ ?\;)))) (url-hexify-string "88@e.com" unreserved-chars) ; => "88@e.com" (url-hexify-string "8%@e.com" unreserved-chars) ; => "8%25@e.com" (url-hexify-string "8/@e.com" unreserved-chars)) ; => "8%2F@e.com" Or, if you don't mind the unnecessary escaping (particularly of "@"), you can just use url-hexify-string with the default set of unreserved characters.