net/url: trim whitespace when getting enviornment variables like http_proxy

For compatibility with other systems, trmi whitespace from environment
variables.

Closes #2663
This commit is contained in:
Matthew Flatt 2021-04-29 11:33:03 -06:00
parent 6f1875c384
commit 0eeb8d26f3

View File

@ -44,7 +44,8 @@
;; proxied-scheme
(define (env->c-p-s-entries . envarses)
(define (in1 proxied-scheme envvar)
(match (getenv envvar)
(match (let ([s (getenv envvar)])
(and s (string-trim s)))
[#f #f]
["" null]
[(app string->url*