From e6c55283d235aa9404395d30f2db891f36995c49 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 9 Jul 2020 16:38:49 +0200 Subject: Keep URIs encoded in the acquire system We do not deal a lot with URIs which need encoding, but then we do it is a pain that we store it decoded in the acquire system as it means we have to decode and reencode URIs eventually which is potentially giving us slightly different URIs. We see that in our own testing framework while setting up redirects as the config options are effectively double-encoded and decoded to pass them around successfully as otherwise %2f and / in an URI are treated the same. This commit adds the infrastructure for methods to opt into getting URIs send in encoded form (and returning them to us in encoded form, too) so that we eventually do not have to touch the URIs which is how it should be. This means though that we have to deal with methods who do not support this yet (aka: all at the moment) for which we decode and encode while communicating with them. --- doc/examples/configure-index | 2 ++ doc/method.dbk | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 0af923811..b73166082 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -223,6 +223,8 @@ Acquire Retries ""; Source-Symlinks ""; ForceHash ""; // hashmethod used for expected hash: sha256, sha1 or md5sum + Send-URI-Encoded ""; // false does the old encode/decode dance even if we could avoid it + URIEncode ""; // characters to encode with percent encoding AllowTLS ""; // whether support for tls is enabled diff --git a/doc/method.dbk b/doc/method.dbk index 410d6898c..ea49c5b54 100644 --- a/doc/method.dbk +++ b/doc/method.dbk @@ -522,8 +522,8 @@ This is a list of which headers each status code can use Displays the capabilities of the method. Methods should set the pipeline bit if their underlying protocol supports pipelining. The only known method that -does support pipelining is http. Fields: Version, Single-Instance, Pre-Scan, -Pipeline, Send-Config, Needs-Cleanup +does support pipelining is http. Fields: Version, Single-Instance, Local-Only, +Pipeline, Send-Config, Needs-Cleanup, Removable, AuxRequests, Send-URI-Encoded -- cgit v1.2.3