server side: smart fetch over HTTP
commit2e5214462e7f7d93ff39b522c2343105443393c9
authorShawn O. Pearce <spearce@spearce.org>
Wed, 6 Jan 2010 19:13:25 +0000 (6 11:13 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 12 Jan 2010 20:01:28 +0000 (12 12:01 -0800)
tree901a550978efaad523d687dbdb43c7eca88a10d4
parent81fea92ef725ab2d685b02052da30a76fb9c5582
server side: smart fetch over HTTP

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

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

The response is formatted with the upload pack capabilities, using
the standard packet line formatter.  A special header line is put
in front of the standard upload-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 UploadPackFactory implementation.

Change-Id: Ib0f1a458c88b4b5509b0f882f55f83f5752bc57a
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/UploadPackServlet.java [new file with mode: 0644]
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java [new file with mode: 0644]
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/UploadPackFactory.java [new file with mode: 0644]