[core] Revert complicated handling for 404 fixed by Sinatra 1.4.0
Merge remote-tracking branch 'upstream/master' into super-admin

* upstream/master:
  [core] Revert complicated handling for 404 fixed by Sinatra 1.4.0