git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 3cf5fe87 authored by mmn's avatar mmn

bad URL is a clientError

parent 94d3f50a
......@@ -46,8 +46,7 @@ class OembedAction extends Action
$url = $this->trimmed('url');
if (substr(strtolower($url),0,strlen(common_root_url())) !== strtolower(common_root_url())) {
// TRANS: Error message displaying attachments. %s is the site's base URL.
// FIXME: 404 not found?! (this will automatically become a 500 because it's not a serverError!)
$this->serverError(sprintf(_('Only %s URLs over plain HTTP please.'), common_root_url()), 404);
$this->clientError(sprintf(_('oEmbed data will only be provided for %s URLs.'), common_root_url()), 400);
}
$path = substr($url,strlen(common_root_url()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment