#44210 closed enhancement (invalid)
Add filter for developers testing downloads from local servers
| Reported by: | afragen | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | HTTP API | Version: | 5.1 |
| Severity: | normal | Keywords: | has-patch close |
| Cc: | Focuses: |
Description
I can be the only one.
I have set up a local git server that runs on my LAN, 192.168.x.x
I use it to test plugin/theme updating. Within wp-includes/http.php wp_http_validate_url() we can already use the filter hook http_request_host_is_external, however, at the end of the function is a conditional test that will still fail and not return the $url. This is because $same_host is false if the dev environment and the local git server aren't on the same host/IP.
if ( $parsed_home && $same_host && isset( $parsed_home['port'] ) && $parsed_home['port'] === $port {
return $url;
}
My patch is a filter in a new conditional just after this penultimate conditional.
Attachments (1)
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I found another way around by filtering 'http_request_args'. Sorry I was premature.