Remove global methods in web.py
Only write response if length greater than 0