Dmitry Timoshkov : winhttp: Move common code to the upper level, avoid accessing the buffer before the buffer size check, make the code conform to existing rules.