Page MenuHomeFreeBSD

fetch(3); Add support of HTTPS_PROXY/https_proxy environment variables
Needs ReviewPublic

Authored by yasu on Jan 31 2021, 5:15 PM.

Details

Reviewers
des
Group Reviewers
manpages
Summary

Add support of HTTPS_PROXY/https_proxy environment variables. They
works similar to FTP_PROXY/ftp_proxy environment variables for FTP
scheme. That is, if scheme of request URL is "https" fetch(3) checks
if following environment variables are set in this order.

  1. HTTPS_PROXY
  2. https_proxy
  3. HTTP_PROXY
  4. http_proxy

And the value of first one set is used as setting of proxy for https.

Test Plan

It isn't possbile test it with unit test because web server and proxy
are required to test. I've been using this patch with -CURRENT and
it seems to work fine at least for me.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 36639
Build 33528: arc lint + arc unit

Event Timeline

yasu requested review of this revision.Jan 31 2021, 5:15 PM
crees added a subscriber: crees.

Couple of minor nits-- if they're fixed (or if HTTP is correct above) then fine for manpages.

.Dd bump on commit :)

lib/libfetch/fetch.3
659

HTTP or HTTPS?

868

We use the serial comma.