lib-git-svn.sh: Add check for mis-configured web server variables
[gitweb.git] / http.c
diff --git a/http.c b/http.c
index 0a5011f615bdfade0b69682b177dc97471ac20a3..17bcf19c5001d309bdbf524e7d3817cf3482a3c3 100644 (file)
--- a/http.c
+++ b/http.c
@@ -279,6 +279,11 @@ static CURL *get_curl_handle(void)
        }
 
        curl_easy_setopt(result, CURLOPT_FOLLOWLOCATION, 1);
+#if LIBCURL_VERSION_NUM >= 0x071301
+       curl_easy_setopt(result, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
+#elif LIBCURL_VERSION_NUM >= 0x071101
+       curl_easy_setopt(result, CURLOPT_POST301, 1);
+#endif
 
        if (getenv("GIT_CURL_VERBOSE"))
                curl_easy_setopt(result, CURLOPT_VERBOSE, 1);