Revamped HTTP hequest handler