Opened 10 years ago
Closed 10 years ago
#37107 closed defect (bug) (fixed)
Requests: Proxy settings aren't honoured
| Reported by: | johnbillion | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | highest omg bbq | Milestone: | 4.6 |
| Component: | HTTP API | Version: | 4.6 |
| Severity: | blocker | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Requests is not honouring the WP_PROXY_HOST and WP_PROXY_PORT constants when they're defined in wp-config.php. Any HTTP API requests simply bypass the proxy.
Attachments (1)
Change History (11)
#2
@
10 years ago
- Priority normal → highest omg bbq
- Severity normal → blocker
Looks like WP_HTTP_Proxy is used directly in WP_Http_Curl() and WP_Http_Streams() instead of WP_Http::request() ,where it belongs I suppose, so it can be passed to Requests::request().
@dd32, @rmccue: Looks like this requires some work.
#3
@
10 years ago
Patch added.
@johnbillion If you already have a local setup with this, can you test and verify?
#5
@
10 years ago
- Keywords needs-patch added; has-patch needs-testing removed
37107.diff doesn't fix the issue. Requests are still bypassing the proxy.
Inside Requests_Proxy_HTTP::curl_before_send(), $this->proxy has no value at the point where the request is made.
#6
@
10 years ago
- Keywords has-patch added; needs-patch removed
@johnbillion Can you please test again with https://github.com/rmccue/Requests/pull/223 applied?
#7
@
10 years ago
With 37107.diff and https://github.com/rmccue/Requests/pull/223 both applied, Requests does now honour the proxy.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
If you don't have a proxy to hand to test this, then entering dummy data into those constant values should cause the HTTP API request to fail, but it doesn't.