You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start with uwsgi --ini=uwsgi.ini. In another window:
(3.6) snafu$ for url in http://localhost:9090/{bug1/,bug/,}; do (set -x; curl $url); done
+ curl http://localhost:9090/bug1/
You may call me uwsgi_file_bug1
+ curl http://localhost:9090/bug/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
+ curl http://localhost:9090/
You may call me uwsgi_file_bug1
Logs in first window:
[pid: 19540|app: 0|req: 1/1] 127.0.0.1 () {24 vars in 242 bytes} [Wed Nov 28 21:21:34 2018] GET /bug1/ => generated 32 bytes in 0 msecs (HTTP/1.1 200) 2 headers in 79 bytes (1 switches on core 0)
[pid: 19540|app: 0|req: 2/2] 127.0.0.1 () {24 vars in 240 bytes} [Wed Nov 28 21:21:34 2018] GET /bug/ => generated 233 bytes in 8 msecs (HTTP/1.1 404) 2 headers in 72 bytes (1 switches on core 0)
[pid: 19540|app: 0|req: 3/3] 127.0.0.1 () {22 vars in 232 bytes} [Wed Nov 28 21:21:34 2018] GET / => generated 32 bytes in 0 msecs (HTTP/1.1 200) 2 headers in 79 bytes (1 switches on core 0)
The text was updated successfully, but these errors were encountered:
It's a shame you didn't get any response from the maintainers after all this time, but the answer is to use --no-default-app (or no-default-app = 1 in an .ini file). This is documented, but not very well.
Unfortunately this still doesn't work quite right as it returns a 500 instead of a 404 for requests that don't hit any app.
Unfortunately this still doesn't work quite right as it returns a 500 instead of a 404 for requests that don't hit any app.
Does anyone here know if this is the intended behaviour? In other words, would the fact that 500 in this instance be considered a bug by the uwsgi team? In that case a fix would be appropriate.
Currently an error code of 500 is returned when no app is found for a
route, but this changes it to a 404 which seems more appropriate. See
this issue for more context:
unbit#1935
uwsgi 2.0.17.1, Python 3.6
Problem
uwsgi routes
/
to the first mounted app, even though / does not match the route mount path.Steps to reproduce:
Start with
uwsgi --ini=uwsgi.ini
. In another window:Logs in first window:
The text was updated successfully, but these errors were encountered: