Improved request parsing for declarative proxy handlers