Improved request header handling