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

Re: Smart fetch via HTTP?

From
JHJan Hudec <bulb@ucw.cz>
Date
May 20, 2007, 10:30 UTC
Message-ID
<20070520103010.GA27087@efreet.light.src>
In-Reply-To
<20070518215607.GT24644@ca-server1.us.oracle.com>
On Fri, May 18, 2007 at 14:56:07 -0700, Joel Becker wrote:
Show 10 quoted lines
> On Fri, May 18, 2007 at 01:13:36PM -0700, Linus Torvalds wrote:
> > If it's _just_ the initial GET/CONNECT strings, yeah, we could probably 
> > easily make the git-daemon just ignore them. That shouldn't be a problem.
> > 
> > But if there's anything *else* required, it gets uglier much more quickly.
> 
> 	With CONNECT, there isn't anything.  That is, your
> GIT_PROXY_COMMAND handles talking to the proxy, then gives git itself a
> raw data pipe.  My proxy allows CONNECT to 9418, and that's how I use it
> today.

Yes. Connect is easy. However many companies only allow CONNECT to 443 (not that it's much more secure than allowing it anywhere, but at least it has to block CONNECT to 25 to block sending spam).

Show 22 quoted lines
> 	If you tried to make POST work (It'd be POST, not GET, as you
> need to connect up the sending side), either apache would have to front
> it for us, or "git-daemon --http" would have to accept the HTTP headers
> on before the input, and output a proper HTTP response before sending
> output.  Seeing the headers would allow for us to vhost, even.
> 	Hmm, but the proxy may not allow two-way communication.  Does
> the git protocol have more than one round-trip?  That is:
> 
> Client:
>     POST http://server.git.host:80/projects/thisproject HTTP/1.1
>     Host: server.git.host
> 
>     fetch-pack <sha1>
>     EOF
> 
> Server:
>     200 OK HTTP/1.1
>     
>     <data>
>     EOF
> 
> should work, I'd think.

Well, that does not require git at all -- apache can handle this all right. But it's not network-efficient. To be network-efficient, it is necessary to negotiate the list of objects that need to be send. And that requires more than one round-trip. Additionally, the current git protocol is streaming -- the client sends data without waiting for the server. So it would require slightly different protocol over HTTP.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Joel BeckerNext: david@lang.hm
Message 41 of 47 in “Smart fetch via HTTP?”
  1. Jan HudecMay 15, 2007
  2. A Large Angry SCMMay 15, 2007
  3. Shawn O. PearceMay 15, 2007
  4. Junio C HamanoMay 16, 2007
  5. Martin LanghoffMay 16, 2007
  6. Johannes SchindelinMay 16, 2007
  7. Martin LanghoffMay 16, 2007
  8. Jakub NarebskiMay 16, 2007
  9. Johannes SchindelinMay 17, 2007
  10. Shawn O. PearceMay 17, 2007
  11. david@lang.hmMay 17, 2007
  12. Shawn O. PearceMay 17, 2007
  13. Shawn O. PearceMay 17, 2007
  14. Theodore TsoMay 17, 2007
  15. Nicolas PitreMay 17, 2007
  16. Johannes SchindelinMay 17, 2007
  17. Nicolas PitreMay 17, 2007
  18. Martin LanghoffMay 17, 2007
  19. Nicolas PitreMay 17, 2007
  20. Jan HudecMay 17, 2007
  21. Nicolas PitreMay 17, 2007
  22. david@lang.hmMay 17, 2007
  23. Johannes SchindelinMay 18, 2007
  24. Jan HudecMay 18, 2007
  25. Matthieu MoyMay 17, 2007
  26. Martin LanghoffMay 17, 2007
  27. Johannes SchindelinMay 17, 2007
  28. Matthieu MoyMay 17, 2007
  29. Martin LanghoffMay 17, 2007
  30. Nicolas PitreMay 17, 2007
  31. Jakub NarebskiMay 17, 2007
  32. Nicolas PitreMay 17, 2007
  33. Petr BaudisMay 17, 2007
  34. Matthieu MoyMay 17, 2007
  35. Linus TorvaldsMay 18, 2007
  36. alanMay 18, 2007
  37. Joel BeckerMay 18, 2007
  38. Matthieu MoyMay 18, 2007
  39. Linus TorvaldsMay 18, 2007
  40. Joel BeckerMay 18, 2007
  41. Jan HudecMay 20, 2007
  42. david@lang.hmMay 19, 2007
  43. Shawn O. PearceMay 19, 2007
  44. david@lang.hmMay 19, 2007
  45. Jan HudecMay 17, 2007
  46. Nicolas PitreMay 17, 2007
  47. Jan HudecMay 18, 2007

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.