Page MenuHomeFreeBSD

fetch(3): Fix wrong usage of proxy when request is redirected to different URL
Needs ReviewPublic

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

Details

Reviewers
des
Summary

Under some proxy settings fetch(3) makes wrong usage of proxy when
request is redirected to different URL. (See "2. Detail of the
problem" of bug 252123 for the situation that the problem happens.)
The source of the problem is that in current implementation proxy
usage is decided with the URL of initial request and reused after the
request is redirected to different one. So the problem is fixed by
changing implementation so proxy usage is re-evaluated with new URL
each time request is redirected.

Test Plan

To test if the problem is fixed with this patch, web servers and
proxy are required. So it isn't possble to test it with unit test.
I tested that the problem is fixed under the situation describled
in bug 252123, but not sure if it is enough.

Diff Detail

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