Opened 9 years ago
Closed 9 years ago
#37107 closed defect (bug) (fixed)
Requests: Proxy settings aren't honoured
| Reported by: | | Owned by: | |
|---|---|---|---|
| Milestone: | 4.6 | Priority: | highest omg bbq |
| Severity: | blocker | Version: | 4.6 |
| Component: | HTTP API | Keywords: | has-patch |
| Focuses: | Cc: |
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
@
9 years ago
- Priority changed from normal to highest omg bbq
- Severity changed from normal to 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
@
9 years ago
Patch added.
@johnbillion If you already have a local setup with this, can you test and verify?
#5
@
9 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
@
9 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
@
9 years ago
With 37107.diff and https://github.com/rmccue/Requests/pull/223 both applied, Requests does now honour the proxy.
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.