Clients are not supposed to change the request method or body in response to HTTP_STATUS_PERMANENT_REDIRECT. We do that currently in winhttp (didn't check wininet); unless the response was HTTP_STATUS_REDIRECT_KEEP_VERB we replace POST with GET and set an empty body. So HTTP_STATUS_PERMANENT_REDIRECT should also be excluded here.
Please split the commit into three, one for each dll.