Fixed web_control.py function to return the proper HTTP response instead of crashing