8000 Follow 308 redirect in WinHTTP transport by pcpthm · Pull Request #5285 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

Follow 308 redirect in WinHTTP transport #5285

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

Merged
merged 1 commit into from
Nov 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/transports/winhttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
# define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 0x00000800
#endif

#ifndef HTTP_STATUS_PERMANENT_REDIRECT
# define HTTP_STATUS_PERMANENT_REDIRECT 308
#endif

#ifndef DWORD_MAX
# define DWORD_MAX 0xffffffff
#endif
Expand Down Expand Up @@ -1071,7 +1075,8 @@ static int winhttp_stream_read(
HTTP_STATUS_REDIRECT == status_code ||
(HTTP_STATUS_REDIRECT_METHOD == status_code &&
get_verb == s->verb) ||
HTTP_STATUS_REDIRECT_KEEP_VERB == status_code)) {
HTTP_STATUS_REDIRECT_KEEP_VERB == status_code ||
HTTP_STATUS_PERMANENT_REDIRECT == status_code)) {

/* Check for Windows 7. This workaround is only necessary on
* Windows Vista and earlier. Windows 7 is version 6.1. */
Expand Down
0