L. Kärkkäinen
L. Kärkkäinen
Two points of action for Sanic. It currently hits this BadURL error in Request constructor, when `httptools.parse_url` fails. The first point, this should be silent and instead actually delived that...
On point 1 above, I see this is properly handled in http1 main protocol, but then it crashes in making the error response in `create_empty_request`, that for better logs/messages still...
A quick patch fixes the handling, giving clean 400 error for `sip:nm` ```diff diff --git a/sanic/http/http1.py b/sanic/http/http1.py index bb317a9..42e08fe 100644 --- a/sanic/http/http1.py +++ b/sanic/http/http1.py @@ -450,18 +450,9 @@ class Http(Stream,...
The invalid URL is included in the exception message itself, so the client will see it, although in server log `http:///*` appears instead of what was actually attempted. If Request...
Setting `host` to localhost instead of IP probably needs to be done in server startup rather than MOTD only, to make `url_for` work as expected without extra configuration. This is...
> Maybe also time to handle the whole server name issue. 😉 That's a can of worms, for sure. Would be useful to first identify all the problems that we...
The route name is with `url_for` so it would have to be constructed from (web side) path then and not be random. This is a breaking change for anyone currently...
Somewhat related is that of having multiple decorators on a single function, or having identically named separate handler functions within the same app (possibly in different modules), as those would...
Even better, use a websocket for large file transfers, or if websockets are not available, do separate requests to transfer it in small chunks. Especially if you are doing video...
In server code? No, that has always been black magic to me. But `sanic --host example.com` leads to `gethostbyname` somewhere, that returns a list of IPs, and Sanic needs to...