Small request handler improvement

I reduced the code.