summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/libgit2-proxy-reconnection.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-06-12 11:31:44 +0200
committerLudovic Courtès <ludo@gnu.org>2025-06-12 14:38:16 +0200
commitf53b9f309f7918702d9a8dbab841f4eb79058afb (patch)
tree13f5cffedc23df326a832fc4fccbefea733bbf4d /gnu/packages/patches/libgit2-proxy-reconnection.patch
parent1a09cd18820b91c9ddb30c08a8eecbe72a9e84b5 (diff)
gnu: libgit2: Patch bug in HTTP proxy support that shows on 302s.
Fixes guix/guix#87. * gnu/packages/patches/libgit2-proxy-reconnection.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/version-control.scm (libgit2-1.9)[source]: Use it. Change-Id: If05b55e616da4d98b3de0e38f6a0d815dd256b92
Diffstat (limited to 'gnu/packages/patches/libgit2-proxy-reconnection.patch')
-rw-r--r--gnu/packages/patches/libgit2-proxy-reconnection.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/packages/patches/libgit2-proxy-reconnection.patch b/gnu/packages/patches/libgit2-proxy-reconnection.patch
new file mode 100644
index 0000000000..b57af8d68b
--- /dev/null
+++ b/gnu/packages/patches/libgit2-proxy-reconnection.patch
@@ -0,0 +1,18 @@
+Temporary fix for <https://github.com/libgit2/libgit2/issues/7081>.
+Submitted as <https://github.com/libgit2/libgit2/pull/7082>.
+
+diff --git a/src/libgit2/transports/httpclient.c b/src/libgit2/transports/httpclient.c
+index e25e0a73a..ecefbcd3e 100644
+--- a/src/libgit2/transports/httpclient.c
++++ b/src/libgit2/transports/httpclient.c
+@@ -914,6 +914,10 @@ GIT_INLINE(git_http_parser_settings *) http_client_parser_settings(void)
+
+ static void reset_parser(git_http_client *client)
+ {
++ /* Force the proxy connection to be closed so a fresh connection is
++ opened for the next CONNECT request. */
++ client->proxy_connected = 0;
++
+ git_http_parser_init(&client->parser,
+ GIT_HTTP_PARSER_RESPONSE,
+ http_client_parser_settings());