From 39d78f3fbf7637fa3e72b5c1ee6c2b0a532072f5 Mon Sep 17 00:00:00 2001 From: Noel Welsh Date: Mon, 6 Aug 2007 13:58:22 +0000 Subject: [PATCH] Wrap a parameter/c contract around current-proxy-servers, so it may be used in calls to parameterize. Add test for same. svn: r7030 --- collects/net/url.ss | 4 ++-- collects/tests/mzscheme/net.ss | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/collects/net/url.ss b/collects/net/url.ss index b0b311f0b4..cb407c2c45 100644 --- a/collects/net/url.ss +++ b/collects/net/url.ss @@ -49,6 +49,6 @@ (combine-url/relative (url? string? . -> . url?)) (url-exception? (any/c . -> . boolean?)) (current-proxy-servers - (case-> ((or/c false/c (listof (list/c string? string? number?))) . -> . void?) - (-> (or/c false/c (listof (list/c string? string? number?)))))))) + (parameter/c (or/c false/c (listof (list/c string? string? number?)))))) + ) diff --git a/collects/tests/mzscheme/net.ss b/collects/tests/mzscheme/net.ss index f8f9cc66b2..2f68bf579b 100644 --- a/collects/tests/mzscheme/net.ss +++ b/collects/tests/mzscheme/net.ss @@ -44,6 +44,10 @@ (test 'amp-or-semi current-alist-separator-mode) (err/rt-test (current-alist-separator-mode 'bad)) +;; Test the current-proxy-servers parameter can be set +(parameterize ([current-proxy-servers '(("http" "proxy.com" 3128))]) + (test '(("http" "proxy.com" 3128)) current-proxy-servers)) + (let ([with-censor (load-relative "censor.ss")]) (with-censor (lambda ()