]> source.dussan.org Git - jgit.git/commit
Support agent= capability in wire protocol 28/46928/5
authorShawn Pearce <spearce@spearce.org>
Thu, 30 Apr 2015 19:43:46 +0000 (12:43 -0700)
committerShawn Pearce <spearce@spearce.org>
Thu, 30 Apr 2015 21:40:35 +0000 (14:40 -0700)
commit4a984e20332a765a81cadeaa4875b228ebf290fb
tree68591da210bd0d795e9e7da3b9ad790d26261840
parent7e0ebb8e29a1bc73ead72bc00569f06169079a26
Support agent= capability in wire protocol

Since git-core ff5effd (v1.7.12.1) the native wire protocol transmits
the server and client implementation and version strings using
capability "agent=git/1.7.12.1" or similar.

Support this in JGit and hang the implementation data off UploadPack
and ReceivePack.  On HTTP transports default to the User-Agent HTTP
header until the client overrides this with the optional capability
string in the first line.

Extract the user agent string into a UserAgent class under transport
where it can be specified to a different value if the application's
build process has broken the Implementation-Version header in the
JGit package.

Change-Id: Icfc6524d84a787386d1786310b421b2f92ae9e65
18 files changed:
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalHttpServerGlue.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/OperationResult.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java