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

[PATCH v2] doc: update http.cookieFile with in-memory cookie processing

From
Piotr Szlazak via GitGitGadget <gitgitgadget@gmail.com>
Date
Jul 11, 2024, 08:36 UTC
Message-ID
<pull.1733.v2.git.git.1720687008915.gitgitgadget@gmail.com>
In-Reply-To
<pull.1733.git.git.1719177846725.gitgitgadget@gmail.com>
From: Piotr Szlazak <piotr.szlazak@gmail.com>

Information added how to enable in-memory cookies processing. Cookies from server will be accepted and send back in successive requests within same connection.

At the moment documentation only mentions how to read cookies from the given file and how to save them to the file using http.saveCookies.

curl / libcurl will process cookies in memory if file name is blank. Check curl manpage: https://curl.se/docs/manpage.html#-b This is described here in more details: https://everything.curl.dev/http/cookies/engine.html And also explained here: https://www.youtube.com/watch?v=V5vZWHP-RqU&t=11459s

Git documentation was updated to include suggestion how to enable this by setting empty value for http.cookieFile.

Changes since V1:
- better explanation what in-memory processing means
- added explanation that http.saveCookies does not work
  if http.cookieFile was set to empty value
Signed-off-by: Piotr Szlazak <piotr.szlazak@gmail.com>
---
    Update http.cookieFile with in-memory cookie processing
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1733%2Fpszlazak%2Fdocumentation-cookieFile-in-memory-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1733/pszlazak/documentation-cookieFile-in-memory-v2
Pull-Request: https://github.com/git/git/pull/1733
Range-diff vs v1:
 1:  5e9b3924224 ! 1:  c4d41b5884d doc: update http.cookieFile with in-memory cookie processing
     @@ Commit message
          Git documentation was updated to include suggestion how to
          enable this by setting empty value for http.cookieFile.
      
     +    Changes since V1:
     +    - better explanation what in-memory processing means
     +    - added explanation that http.saveCookies does not work
     +      if http.cookieFile was set to empty value
     +
          Signed-off-by: Piotr Szlazak <piotr.szlazak@gmail.com>
      
       ## Documentation/config/http.txt ##
     @@ Documentation/config/http.txt: http.extraHeader::
      -	in the Git http session, if they match the server. The file format
      -	of the file to read cookies from should be plain HTTP headers or
      -	the Netscape/Mozilla cookie file format (see `curl(1)`).
     +-	NOTE that the file specified with http.cookieFile is used only as
     +-	input unless http.saveCookies is set.
      +	which should be used in the Git http session, if they match the server.
      +	The file format of the file to read cookies from should be plain HTTP
      +	headers or the Netscape/Mozilla cookie file format (see `curl(1)`).
     -+	Set it to empty value, to enable in-memory cookies processing.
     - 	NOTE that the file specified with http.cookieFile is used only as
     - 	input unless http.saveCookies is set.
     ++	Set it to empty value (''), to accept only new cookies from the server and
     ++	send them back in successive requests within same connection. NOTE that the
     ++	file specified with http.cookieFile is used only as input unless
     ++	http.saveCookies is set.
     + 
     + http.saveCookies::
     + 	If set, store cookies received during requests to the file specified by
     +-	http.cookieFile. Has no effect if http.cookieFile is unset.
     ++	http.cookieFile. Has no effect if http.cookieFile is not set or set to empty
     ++	value ('').
       
     + http.version::
     + 	Use the specified HTTP protocol version when communicating with a server.
 Documentation/config/http.txt | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/Documentation/config/http.txt b/Documentation/config/http.txt
index 2d4e0c9b869..e71ca11c10b 100644
--- a/Documentation/config/http.txt
+++ b/Documentation/config/http.txt
@@ -78,16 +78,18 @@ http.extraHeader::
 
 http.cookieFile::
 	The pathname of a file containing previously stored cookie lines,
-	which should be used
-	in the Git http session, if they match the server. The file format
-	of the file to read cookies from should be plain HTTP headers or
-	the Netscape/Mozilla cookie file format (see `curl(1)`).
-	NOTE that the file specified with http.cookieFile is used only as
-	input unless http.saveCookies is set.
+	which should be used in the Git http session, if they match the server.
+	The file format of the file to read cookies from should be plain HTTP
+	headers or the Netscape/Mozilla cookie file format (see `curl(1)`).
+	Set it to empty value (''), to accept only new cookies from the server and
+	send them back in successive requests within same connection. NOTE that the
+	file specified with http.cookieFile is used only as input unless
+	http.saveCookies is set.
 
 http.saveCookies::
 	If set, store cookies received during requests to the file specified by
-	http.cookieFile. Has no effect if http.cookieFile is unset.
+	http.cookieFile. Has no effect if http.cookieFile is not set or set to empty
+	value ('').
 
 http.version::
 	Use the specified HTTP protocol version when communicating with a server.

base-commit: 66ac6e4bcd111be3fa9c2a6b3fafea718d00678d
-- 
gitgitgadget
Previous: Piotr SzlazakNext: Junio C Hamano
Message 6 of 7 in “doc: update http.cookieFile with in-memory cookie processing”
  1. doc: update http.cookieFile with in-memory cookie processingPiotr Szlazak via GitGitGadget, Jun 23, 2024
  2. Piotr SzlazakJul 9, 2024
  3. Junio C HamanoJul 9, 2024
  4. Junio C HamanoJul 9, 2024
  5. Piotr SzlazakJul 11, 2024
  6. doc: update http.cookieFile with in-memory cookie processingPiotr Szlazak via GitGitGadget, Jul 11, 2024
  7. Junio C HamanoJul 11, 2024

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.