server side: smart push over HTTP
commit81fea92ef725ab2d685b02052da30a76fb9c5582
authorShawn O. Pearce <spearce@spearce.org>
Wed, 6 Jan 2010 19:13:05 +0000 (6 11:13 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 12 Jan 2010 20:01:28 +0000 (12 12:01 -0800)
tree28c33b6318794084b2f7af30f33b1198a82025fe
parent5e33a1de831fcbac4ff53cadacfdfc8e7b204ffe
server side: smart push over HTTP

Clients can request smart push support by examining the info/refs URL
with the service parameter set to the magic git-receive-pack string:

  GET /$GIT_DIR/info/refs?service=git-receive-pack HTTP/1.1

The response is formatted with the receive pack capabilities, using
the standard packet line formatter.  A special header block is put
in front of the standard receive-pack advertisement to let clients
know the service was recognized and is supported.

If the requested service is disabled an authorization status code is
returned, allowing the user agent to retry once they have obtained
credentials from a human, in case authentication is required by
the configured ReceivePackFactory implementation.

Change-Id: Ie4f6e0c7b68a68ec4b7cdd5072f91dd406210d4f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java [new file with mode: 0644]
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java [new file with mode: 0644]
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java [new file with mode: 0644]
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/ReceivePackFactory.java [new file with mode: 0644]