https://bugs.winehq.org/show_bug.cgi?id=36641
--- Comment #3 from Sebastian Lackner sebastian@fds-team.de --- Bruno Jesus wrote some tests to verify how these functions behave on Windows, and submitted a patch including some tests:
http://source.winehq.org/patches/data/105231
This is just the first part, it will also be necessary to write tests for the *W version of the HttpQueryInfo function.
These tests seem to confirm that Windows really writes over the end of the user-supplied buffer in some cases (and we probably have to fix the tests instead of the implementation). Its probably better to gather some more test results before fixing this issue, otherwise this might cause regressions in applications, that depend on this broken Windows behaviour.