On Fri, May 23, 2014 at 08:10:16PM +0200, Jim Klimov wrote:
> >  libcurl = noproxy localhost
> 
> Nice hint, this seems to help the locally mirrored repositories indeed! I
> believe this should be expandable for enabling direct access to other hosts
> as well... Thanks ;)

Good.

If you want to add other items to the noproxy list you will need this 
patch. The CURLOPT_NOPROXY list is comma separated so we need to to 
support escaping of separators within configuration options.

 libcurl = noproxy localhost\,anotherhost

should then work.

Mark


commit 5137b5cabde90f2d5ad0ff2ab99af4f4e1c7e94c
Author: Mark Hindley <[email protected]>
Date:   Sat May 24 09:41:55 2014 +0100

    Support escaping of separators (comma or semicolon) within configuration 
options.

diff --git a/lib/apt-cacher.pl b/lib/apt-cacher.pl
index 4e2f13a..52721a0 100755
--- a/lib/apt-cacher.pl
+++ b/lib/apt-cacher.pl
@@ -223,7 +223,9 @@ sub read_config {
 
 sub cfg_split {
     my ($item) = @_;
-    return $item ? grep {length} split(/\s*[,;]\s*/, $item) : undef;
+    return $item ? grep {length} # Remove empty
+      map {s#\\(?=[,;])##; $_} # Normalise escaped separators
+       split(/\s*(?<!\\)[,;]\s*/, $item) : undef;
 }
 
 sub private_config {


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to