# HTTP pushes

8 messages from 2005-11-01 to 2005-11-03. Participants: Nick Hengeveld, Johannes Schindelin, Daniel Barkalow, Junio C Hamano, David Lang, H. Peter Anvin.
Thread: https://gitlist.dev/t/2285

## Nick Hengeveld, 2005-11-01 02:02

Subject: HTTP pushes
Message-ID: <20051101020248.GA3928@reactrix.com>
URL: https://gitlist.dev/e/20051101020248.GA3928%40reactrix.com

```
HTTP is currently listed as a read-only/unsupported method for doing
pushes, is that due to inherent problems with HTTP or just because
it hasn't been written yet?

I've built a working prototype of an HTTP push implementation using DAV.
It locks the remote branch file during the push and PUTs to temp files to
insure nobody else reads objects while they're being pushed.  It does
not validate remote objects - if they exist on the remote end as loose
objects or in a pack, local copies won't be pushed.  It supports sparse
object directories, and verifies that the remote branch is an ancestor
of the local branch before doing anything.

I'm curious to know whether it would be useful to proceed further, and
to know what I haven't thought about yet...

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

```

## Johannes Schindelin, 2005-11-01 19:10

Subject: Re: HTTP pushes
Message-ID: <Pine.LNX.4.63.0511012008310.11979@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511012008310.11979%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <20051101020248.GA3928@reactrix.com>

```
Hi,

On Mon, 31 Oct 2005, Nick Hengeveld wrote:

> HTTP is currently listed as a read-only/unsupported method for doing
> pushes, is that due to inherent problems with HTTP or just because
> it hasn't been written yet?
> 
> I've built a working prototype of an HTTP push implementation using DAV.

I think this is useful. There are restrictive firewalls out there, which 
only allow ports 80 and 443 to be connected to. Your work would fit in 
right there.

BTW, if the push would be relatively big, it would be nice to support 
pushing packs...

Ciao,
Dscho

```

## Daniel Barkalow, 2005-11-01 20:06

Subject: Re: HTTP pushes
Message-ID: <Pine.LNX.4.64.0511011500580.25300@iabervon.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511011500580.25300%40iabervon.org
In-Reply-To: <20051101020248.GA3928@reactrix.com>

```
On Mon, 31 Oct 2005, Nick Hengeveld wrote:

> HTTP is currently listed as a read-only/unsupported method for doing
> pushes, is that due to inherent problems with HTTP or just because
> it hasn't been written yet?

You obviously need a bit more than HTTP, and I don't personally know DAV. 
Also, I was writing things with all of the control on the receiving side, 
which isn't going to be the case here. If you've got a suitable 
environment for that sort of thing, I say go for it.

	-Daniel
*This .sig left intentionally blank*

```

## Junio C Hamano, 2005-11-02 00:36

Subject: Re: HTTP pushes
Message-ID: <7v1x1z51id.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v1x1z51id.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.63.0511012008310.11979@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Mon, 31 Oct 2005, Nick Hengeveld wrote:
>
>> HTTP is currently listed as a read-only/unsupported method for doing
>> pushes, is that due to inherent problems with HTTP or just because
>> it hasn't been written yet?
>> 
>> I've built a working prototype of an HTTP push implementation using DAV.

I had an impression that DAV has its own notion of version
control, so using git as a backend on the server side might be
an interesting exercise.

> I think this is useful. There are restrictive firewalls out there, which 
> only allow ports 80 and 443 to be connected to. Your work would fit in 
> right there.

Another solution for this would be to allow connect.c to use a
HTTP connect passthru proxy. CVS does this with an ugly but easy
to understand notation:

    ':pserver;proxy=firewall;proxyport=3128:user@host:/path/to/repo

```

## David Lang, 2005-11-02 00:46

Subject: Re: HTTP pushes
Message-ID: <Pine.LNX.4.62.0511011644500.1362@qynat.qvtvafvgr.pbz>
URL: https://gitlist.dev/e/Pine.LNX.4.62.0511011644500.1362%40qynat.qvtvafvgr.pbz
In-Reply-To: <7v1x1z51id.fsf@assigned-by-dhcp.cox.net>

```
On Tue, 1 Nov 2005, Junio C Hamano wrote:

>> I think this is useful. There are restrictive firewalls out there, which
>> only allow ports 80 and 443 to be connected to. Your work would fit in
>> right there.
>
> Another solution for this would be to allow connect.c to use a
> HTTP connect passthru proxy. CVS does this with an ugly but easy
> to understand notation:
>
>    ':pserver;proxy=firewall;proxyport=3128:user@host:/path/to/repo
>

please note that there are firewalls out there that don't let you use port 
443 (and the connect command) as a free pass to do anything you want. They 
verify that you at least do a valid SSL handshake immediatly after or they 
figure you are trying to bypass them and shut you down.

David Lang


-- 
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
  -- C.A.R. Hoare

```

## Nick Hengeveld, 2005-11-02 00:59

Subject: Re: HTTP pushes
Message-ID: <20051102005957.GB3928@reactrix.com>
URL: https://gitlist.dev/e/20051102005957.GB3928%40reactrix.com
In-Reply-To: <7v1x1z51id.fsf@assigned-by-dhcp.cox.net>

```
On Tue, Nov 01, 2005 at 04:36:42PM -0800, Junio C Hamano wrote:

> I had an impression that DAV has its own notion of version
> control, so using git as a backend on the server side might be
> an interesting exercise.

There are versioning extensions to DAV, but they're not supported in all
implementations - for example, Apache's mod_dav only supports the
distributed authoring methods and that's what I've been testing with.
Pushing should work fine to a version-aware DAV server, although the
push should fail if the repository files are version-controlled (they
don't have to be, and it wouldn't make sense for them to be anyway.)

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

```

## Johannes Schindelin, 2005-11-02 01:10

Subject: Re: HTTP pushes
Message-ID: <Pine.LNX.4.63.0511020209400.13811@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511020209400.13811%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <7v1x1z51id.fsf@assigned-by-dhcp.cox.net>

```
Hi,

On Tue, 1 Nov 2005, Junio C Hamano wrote:

> I had an impression that DAV has its own notion of version
> control, so using git as a backend on the server side might be
> an interesting exercise.

IIRC Subversion can operate over DAV, too.

Ciao,
Dscho

```

## H. Peter Anvin, 2005-11-03 04:12

Subject: Re: HTTP pushes
Message-ID: <43698E34.1060805@zytor.com>
URL: https://gitlist.dev/e/43698E34.1060805%40zytor.com
In-Reply-To: <Pine.LNX.4.64.0511011500580.25300@iabervon.org>

```
Daniel Barkalow wrote:
> 
> You obviously need a bit more than HTTP...
 >

Not really, as long as you can GET and POST arbitrary files.  Arguably, 
that's not how POST is typically used, though.
	
	-hpa

```
