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

Re: [PATCH v2] Added Curl Option to Override Request Method v2

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 27, 2022, 00:49 UTC
Message-ID
<YmiS/U34WJG/qRoT@camp.crustytoothpaste.net>
In-Reply-To
<CANDN8xGh31E3VwgRUb6YgFuswiyYjzJwK-tyvmo2c6KY+pOtJA@mail.gmail.com>
On 2022-04-26 at 23:34:32, Drew Green wrote:
> Brian - I understand what you're saying, however I don't think adding
> this feature is detrimental in any way. It is simply leveraging a
> feature of curl without any promises of resulting behavior. Why not
> allow users to take advantage of a library feature if it can help?

Because the protocol is defined to use POST. We might well define GET to mean something different in the future. HTTP verbs are not interchangeable, and GET requests can be subject to caching while POST requests typically cannot. Similarly, GET requests are idempotent, while POST requests are not, and what you're proposing would allow creating non-idempotent GET requests, thereby violating the HTTP specification.

Also, people will expect it to work and complain when it doesn't. People will complain that GitHub no longer supports it if we fix the bug[0] because Git has an option to use GET. People will also expect this support in Git LFS as well even though it cannot possibly work there, and be angry that we won't support it.

I'm very much opposed to this. There are all sorts of broken proxies which break Git in various ways, and this is just another situation in which they do that. The solution is to use SSH, if that's available, or fix the proxy. A proxy that doesn't handle POST properly doesn't even speak HTTP/1.1 properly, and that was defined in 1999. There's really no excuse to have such software on the Internet today. Such a proxy wouldn't even be usable for a web browser.

[0] It is my intention to fix this bug in GitHub's Git service in short order.

-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Drew Green
Message 5 of 5 in “Added Curl Option to Override Request Method”
  1. Added Curl Option to Override Request MethodDrew Green via GitGitGadget, Apr 26, 2022
  2. Added Curl Option to Override Request Method v2Drew Green via GitGitGadget, Apr 26, 2022
  3. brian m. carlsonApr 26, 2022
  4. Drew GreenApr 26, 2022
  5. brian m. carlsonApr 27, 2022

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.