git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] t5551-http-fetch: Work around some libcurl versions

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 9, 2009, 18:10 UTC
Message-ID
<1257790237-30850-2-git-send-email-spearce@spearce.org>
In-Reply-To
<1257790237-30850-1-git-send-email-spearce@spearce.org>

Some versions of libcurl report their output when GIT_CURL_VERBOSE is set differently than other versions do. At least one variant (version unknown but likely pre-7.18.1) reports the POST payload to stderr, and omits the blank line after each HTTP request/response. We clip these lines out of the stderr output now before doing the compare, so we aren't surprised by this trivial difference.

Reported-by: Tarmigan <tarmigan+git@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 t/t5551-http-fetch.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh
index eb0c039..6b0165c 100755
--- a/t/t5551-http-fetch.sh
+++ b/t/t5551-http-fetch.sh
@@ -31,23 +31,19 @@ cat >exp <<EOF
 > GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1
 > Accept: */*
 > Pragma: no-cache
-
 < HTTP/1.1 200 OK
 < Pragma: no-cache
 < Cache-Control: no-cache, max-age=0, must-revalidate
 < Content-Type: application/x-git-upload-pack-advertisement
-< 
 > POST /smart/repo.git/git-upload-pack HTTP/1.1
 > Accept-Encoding: deflate, gzip
 > Content-Type: application/x-git-upload-pack-request
 > Accept: application/x-git-upload-pack-response
 > Content-Length: xxx
-
 < HTTP/1.1 200 OK
 < Pragma: no-cache
 < Cache-Control: no-cache, max-age=0, must-revalidate
 < Content-Type: application/x-git-upload-pack-result
-< 
 EOF
 test_expect_success 'clone http repository' '
 	GIT_CURL_VERBOSE=1 git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err &&
@@ -56,6 +52,8 @@ test_expect_success 'clone http repository' '
 	sed -e "
 		s/Q\$//
 		/^[*] /d
+		/^$/d
+		/^< $/d
 
 		/^[^><]/{
 			s/^/> /
@@ -64,6 +62,8 @@ test_expect_success 'clone http repository' '
 		/^> User-Agent: /d
 		/^> Host: /d
 		s/^> Content-Length: .*/> Content-Length: xxx/
+		/^00..want /d
+		/^00.*done/d
 
 		/^< Server: /d
 		/^< Expires: /d
-- 
1.6.5.2.351.g09432
Previous: Shawn O. PearceNext: Tarmigan
Message 2 of 5 in “http-backend: Fix symbol clash on AIX 5.3”
  1. 1/3 http-backend: Fix symbol clash on AIX 5.3Shawn O. Pearce, Nov 9, 2009
  2. 2/3 t5551-http-fetch: Work around some libcurl versionsShawn O. Pearce, Nov 9, 2009
  3. TarmiganNov 9, 2009
  4. 3/3 t5551-http-fetch: Work around broken Accept header in libcurlShawn O. Pearce, Nov 9, 2009
  5. TarmiganNov 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.