-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checker & Server on same WP site: Download failed (503 Service unavailable) #489
Comments
Here are some ideas:
|
Also - check if there's a firewall/IDS that might be blocking local requests. |
Yes, I'm using latest version. What was the issue then?
Can't test download with browser because of required authorization, but it should work and did work without authorization because browser request is not from same WP site/IP. But ?action=get_metadata does work in browser and from update checker on same WP site. Action=download does work from another WP site, no "problemo".
Nothing in error logs, only 503 in access logs, same on Apache and Nginx. |
If I remember correctly, the issue was that WordPress intentionally blocks local HTTP requests. Some discussion here: There's a filter that lets plugins override that restriction. Anything in |
No logs there Maybe this has something to do with receiving and sending on same IP and/or latest WP? Yes I tried \add_filter( 'block_local_requests', '__return_false' ); No success.
AFAIK, that is not the case. Nothing stands between local/net request and localhost. I built both servers. One is in local network, another in cloud VPS. Thanks. I will let you know if/when I find or fix the cause. 👍 |
Just to note: If you can see the request in the access log, I think that proves that WordPress allowed the request to be sent. So you can at least rule out that particular problem. |
Yeah. That also means that there is no blocking firewall rule from/to localhost. Only difference between (working) get-metadata and (failed) download action is actually plugin.zip response, receive plugin.zip, download (save) and plugin upgrade which all together may require larger memory resources. Lack of the memory usually does not allow server to return detailed error code. Fix: When request for get-metadata comes from same Site URL, instead of download URL, provide plugin absolute path to metadata->downloadUrl. In derived generateDownloadUrl( $package ) do something like: if ( $request->wpSiteUrl === home_url() ) {
return $package->getFilename();
}
return parent::generateDownloadUrl( $package ); |
Hi,
When update server and plugin (with update checker) are on same WP site, cannot get ?action=download working (503 Service unavailable)
Any idea?
Thanks.
The text was updated successfully, but these errors were encountered: