Most browsers will not set hostname port header if they are connecting on the standard port 80. This breaks request.hostname.
Traceback (most recent call last):
File "./test.py", line 215, in hello
url = request.hostname+request.path
File "/usr/local/lib/python3.6/site-packages/japronto/request/__init__.py", line 128, in hostname
return hostname_and_port(request)[0]
File "/usr/local/lib/python3.6/site-packages/japronto/request/__init__.py", line 39, in wrapper
result = func(request)
File "/usr/local/lib/python3.6/site-packages/japronto/request/__init__.py", line 120, in hostname_and_port
return encodings.idna.ToUnicode(hostname), int(port)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Most browsers will not set hostname port header if they are connecting on the standard port 80. This breaks request.hostname.