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

[Bug] Query string not being phrased correctly when question marks present in config URL.

From
SLSteven Lawler <steven.lawler777@gmail.com>
Date
Sep 22, 2014, 18:20 UTC
Message-ID
<CAOf__z5DTzchZpnz-DzoOEHnt8RdypV7=RPP1=AzinsskQEg8w@mail.gmail.com>
Cause:
[remote "repo"]
  url = http://example.com/git/example.com?foo=bar
There is a question mark in the URL of the repo URL.

Effect (Taken from Apache logs): [22/Sep/2014:14:12:07 -0400] "GET /git/example.com?foo=bar/info/refs&service=git-receive-pack HTTP/1.1" 403 207 "-" "git/1.9.4.msysgit.1"

Git attempts to correct the issue by making the query string continue using ampersands where it would have started the original query string.

Expected outcome: The git client should move the ?foo=bar onto the beginning (or end) of the query string that it is creating. For example: [22/Sep/2014:14:12:07 -0400] "GET /git/example.com/info/refs?foo=bar&service=git-receive-pack HTTP/1.1" 403 207 "-" "git/1.9.4.msysgit.1"

This is caused on the git client, double checked with Wireshark. I have not tested this on HTTPS, but imagine the output is the same.

Next: Jeff King
Message 1 of 2 in “[Bug] Query string not being phrased correctly when question marks present in config URL.”
  1. Steven LawlerSep 22, 2014
  2. Jeff KingSep 23, 2014

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.