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

AW: [PATCH] http-backend: respect CONTENT_LENGTH as specified by rfc3875

From
FMFlorian Manschwetus <manschwetus@cs-software-gmbh.de>
Date
Nov 24, 2017, 08:30 UTC
Message-ID
<F0F5A56A22F20D4CB4A03BB8D66587970253F84634@SERVER2011.CS-SOFTWARE.local>
In-Reply-To
<xmqqvai0nrv9.fsf@gitster.mtv.corp.google.com>

Hi All, thx Max for jumping in, I wasn't able to complete this due to serious lack of time. Later I forgot it. Great to see that this finally made it.

Mit freundlichen Grüßen / With kind regards Florian Manschwetus

E-Mail: manschwetus@cs-software-gmbh.de
Tel.: +49-(0)611-8908534
 
CS Software Concepts and Solutions GmbH
Geschäftsführer / Managing director: Dr. Werner Alexi 
Amtsgericht Wiesbaden HRB 10004 (Commercial registry)
Schiersteiner Straße 31
D-65187 Wiesbaden
Germany
Tel.: 0611/8908555
Show 56 quoted lines
> -----Ursprüngliche Nachricht-----
> Von: Junio C Hamano [mailto:gitster@pobox.com]
> Gesendet: Freitag, 24. November 2017 06:55
> An: Max Kirillov
> Cc: Jeff King; Florian Manschwetus; Chris Packham; Konstantin Khomoutov;
> git@vger.kernel.org
> Betreff: Re: [PATCH] http-backend: respect CONTENT_LENGTH as specified
> by rfc3875
> 
> Max Kirillov <max@max630.net> writes:
> 
> > http-backend reads whole input until EOF. However, the RFC 3875
> > specifies that a script must read only as many bytes as specified by
> > CONTENT_LENGTH environment variable. This causes hang under
> IIS/Windows, for example.
> >
> > Make http-backend read only CONTENT_LENGTH bytes, if it's defined,
> > rather than the whole input until EOF. If the varibale is not defined,
> > keep older behavior of reading until EOF because it is used to support
> chunked transfer-encoding.
> >
> > Signed-off-by: Florian Manschwetus <manschwetus@cs-software-
> gmbh.de>
> > Authored-by: Florian Manschwetus <manschwetus@cs-software-
> gmbh.de>
> > Fixed-by: Max Kirillov <max@max630.net>
> > Signed-off-by: Max Kirillov <max@max630.net>
> > ---
> > ...
> > I hope I marked it correctly in the trailers.
> 
> It is probably more conventional to do it like so:
> 
>     From: Florian Manschwetus <manschwetus@cs-software-gmbh.de>
>     Date: <original date of Florian's patch series>
> 
>     http-backend reads whole input until EOF. However, the RFC 3875...
>     ... chunked transfer-encoding.
> 
>     Signed-off-by: Florian Manschwetus <manschwetus@cs-software-
> gmbh.de>
>     [mk: fixed trivial build failures and stuff]
>     Signed-off-by: Max Kirillov <max@max630.net>
>     ---
> 
> >
> > +/*
> > + * replacement for original read_request, now renamed to
> > +read_request_eof,
> > + * honoring given content_length (req_len),
> > + * provided by new wrapper function read_request  */
> 
> I agree with Eric's suggestion.  In-code comment is read by those who have
> the current code, without knowing/caring what it used to be.  "It used to do
> this, but replace it with this new thing because..." is a valuable thing to record
> in the log message, but not here.
Previous: Junio C HamanoNext: Max Kirillov
Message 11 of 50 in “Fix http-backend reading till EOF, ignoring CONTENT_LENGTH, violating rfc3875 -- WAS: Problem with git-http-backend.exe as iis cgi”
  1. Fix http-backend reading till EOF, ignoring CONTENT_LENGTH, violating rfc3875 -- WAS: Problem with git-http-backend.exe as iis cgiFlorian Manschwetus, Mar 29, 2016
  2. Jeff KingMar 29, 2016
  3. AW: [PATCH] Fix http-backend reading till EOF, ignoring CONTENT_LENGTH, violating rfc3875 -- WAS: Problem with git-http-backend.exe as iis cgiFlorian Manschwetus, Mar 30, 2016
  4. Jeff KingApr 1, 2016
  5. http-backend: respect CONTENT_LENGTH as specified by rfc3875Max Kirillov, Nov 23, 2017
  6. Eric SunshineNov 24, 2017
  7. Max KirillovNov 25, 2017
  8. Eric SunshineNov 26, 2017
  9. Max KirillovNov 26, 2017
  10. Junio C HamanoNov 24, 2017
  11. AW: [PATCH] http-backend: respect CONTENT_LENGTH as specified by rfc3875Florian Manschwetus, Nov 24, 2017
  12. Max KirillovNov 26, 2017
  13. 0/2 http-backend: respect CONTENT_LENGTH as specified by rfc3875Max Kirillov, Nov 26, 2017
  14. 1/2 http-backend: respect CONTENT_LENGTH as specified by rfc3875Max Kirillov, Nov 26, 2017
  15. 2/2 t5560-http-backend-noserver.sh: add CONTENT_LENGTH casesMax Kirillov, Nov 26, 2017
  16. 0/2 http-backend: respect CONTENT_LENGTH as specified by rfc3875Max Kirillov, Nov 26, 2017
  17. 2/2 t5560-http-backend-noserver.sh: add CONTENT_LENGTH casesMax Kirillov, Nov 26, 2017
  18. 1/2 http-backend: respect CONTENT_LENGTH as specified by rfc3875Max Kirillov, Nov 26, 2017
  19. Junio C HamanoNov 26, 2017
  20. Max KirillovNov 26, 2017
  21. Junio C HamanoNov 26, 2017
  22. Max KirillovNov 26, 2017
  23. 0/2 http-backend: respect CONTENT_LENGTH as specified by rfc3875Max Kirillov, Nov 26, 2017
  24. 1/2 http-backend: respect CONTENT_LENGTH as specified by rfc3875Max Kirillov, Nov 26, 2017
  25. Eric SunshineNov 26, 2017
  26. Jeff KingNov 29, 2017
  27. Junio C HamanoDec 3, 2017
  28. Jeff KingDec 3, 2017
  29. Junio C HamanoDec 3, 2017
  30. AW: [PATCH v6 1/2] http-backend: respect CONTENT_LENGTH as specified by rfc3875Florian Manschwetus, Dec 4, 2017
  31. Jeff KingDec 4, 2017
  32. 2/2 t5560-http-backend-noserver.sh: add CONTENT_LENGTH casesMax Kirillov, Nov 26, 2017
  33. Eric SunshineNov 26, 2017
  34. Max KirillovNov 26, 2017
  35. Jeff KingNov 29, 2017
  36. Max KirillovNov 29, 2017
  37. Junio C HamanoDec 3, 2017
  38. Junio C HamanoNov 27, 2017
  39. Junio C HamanoNov 27, 2017
  40. Max KirillovNov 29, 2017
  41. Junio C HamanoDec 3, 2017
  42. Need to add test artifacts to .gitignoreDan Jacques, Dec 12, 2017
  43. t/helper: Move sources to t/helper-src; gitignore any files in t/helperStefan Beller, Dec 12, 2017
  44. Junio C HamanoDec 12, 2017
  45. t/helper: ignore everything but sourcesStefan Beller, Dec 12, 2017
  46. Junio C HamanoDec 12, 2017
  47. t/helper: ignore everything but sourcesStefan Beller, Dec 13, 2017
  48. Todd ZullingerDec 12, 2017
  49. Junio C HamanoDec 19, 2017
  50. Max KirillovDec 20, 2017

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.