-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HttpWebRequest does not add referer header to redirects when AllowAutoRedirect is true #31225
Comments
I tried the repro on .NET Framework as well as .NET Core. Neither set the HttpWebRequest.Referer property automatically on autoredirect handling. Nor does any 'Referer' request header get sent automatically on the the wire. I believe that the documentation is incorrect and needs to be fixed. |
@cubesnyc, would you like to create a PR in the dotnet-api-docs repo? |
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. This process is part of our issue cleanup automation. |
This issue will now be closed since it had been marked |
The docs are still not fixed. |
Fixes dotnet/runtime#31225 Retested the WebRequest, it does not auto-include the Referer header in any of the requests during redirect.
Fixes dotnet/runtime#31225 Retested the WebRequest, it does not auto-include the Referer header in any of the requests during redirect.
According to
https://docs.microsoft.com/en-us/dotnet/api/system.net.httpwebrequest.referer?view=netframework-4.8
"If the AllowAutoRedirect property is true, the Referer property is set automatically when the request is redirected to another site."
However, this behavior does not happen.
Quick reproducible code:
The text was updated successfully, but these errors were encountered: