#44210 closed enhancement (invalid)
Add filter for developers testing downloads from local servers
Reported by: | afragen | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.1 |
Component: | HTTP API | Keywords: | has-patch close |
Focuses: | Cc: |
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.
I found another way around by filtering 'http_request_args'. Sorry I was premature.