summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.apache
Commit message (Collapse)AuthorAgeFilesLines
* bazel: Add explicit targets for library dependenciesJonathan Nieder2017-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | This provides a place to declare visibility restrictions and transitive dependencies for each library. Other targets should only declare dependencies on what they directly use, making dependencies easier to maintain. Trim the dependencies of org.eclipse.jgit:jgit to follow that rule. It declares dependencies on Apache httpcomponents and the servlet API but doesn't use them. Tested: * 'bazel build //...' succeeds * applying the change https://gerrit-review.googlesource.com/90843 to a copy of Gerrit, following the instructions there, and running 'bazel test //...' in that copy of Gerrit still succeeds Change-Id: I3ab958ce8b3227019cdbe4cc81e0f042e1541034
* Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-202-3/+3
| | | | | | | | | | Since the introduction of generic type parameter inference in Java 7, it's not necessary to explicitly specify the type of generic parameters. Enable the warning in Eclipse, and fix all occurrences. Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable and fix 'Should be tagged with @Override' warningDavid Pursehouse2017-02-194-1/+35
| | | | | | | | | | | | | | | | | | | | | | | Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Remove unused org.apache.http.impl.client.cache requirementAndrey Loskutov2017-01-261-1/+0
| | | | | | | | | | The package is not used by the plugin and seems to be missing in the platform anyway under some conditions, see bug 508321 (newer org.apache.httpcomponents.httpclient_4.5.2 does NOT include the package, org.apache.httpcomponents.httpclient_4.3.6 does). Change-Id: Ida5d926a611812b5177af651b3cf22f1b2519e02 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Implement Bazel build for http-apache, lfs, lfs-serverDavid Pursehouse2017-01-221-0/+13
| | | | | | | | | | | | | | | | | | | | Test plan: $ bazel build all $ unzip -t bazel-genfiles/all.zip Archive: bazel-genfiles/all.zip testing: libhttp-apache.jar OK testing: libjgit-archive.jar OK testing: libjgit-lfs-server.jar OK testing: libjgit-lfs.jar OK testing: libjgit-servlet.jar OK testing: libjgit.jar OK testing: libjunit.jar OK No errors detected in compressed data of bazel-genfiles/all.zip. Change-Id: I9e6c60898ccc6d2a4557ec7544c297442a9702b4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.7.0-SNAPSHOT buildsMatthias Sohn2016-12-272-6/+6
| | | | | Change-Id: I20754d13007e6591d36aae5766f3a9a82b24e120 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.6.1-SNAPSHOT buildsMatthias Sohn2016-12-242-6/+6
| | | | | Change-Id: I6b05a6f6c3f92365c272e1bdaf76093ca01f2d58 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.6.0.201612231935-rv4.6.0.201612231935-rMatthias Sohn2016-12-242-2/+2
| | | | | Change-Id: Iaa88fe1b195dfe6be99a7b4cb064684e75563715 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix content length in HttpClientConnectionZhen Chen2016-11-221-2/+11
| | | | | | | | | | | | | Per the interface specification, the getContentLength method should return -1 if content length is unknown or greater than Integer.MAX_VALUE. For chunked transfer encoding, the content length is not included in the header, hence will cause a NullPointerException when trying to parse the content length header. Change-Id: Iaa36b5c146a8d654e364635fa0bd2d14129baf17 Signed-off-by: Zhen Chen <czhen@google.com>
* Use valueOf rather than constructor for Integer and BooleanDavid Pursehouse2016-10-182-4/+4
| | | | | Change-Id: I1c65b2e40ba6ec5860903b11b4631e014f3dc5ce Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HttpClientConnection: Register connection socket factory for httpMatthias Sohn2016-10-131-1/+4
| | | | | | | It is necessary to register a socket connection factory to prevent the "http protocol is not supported" error when connecting over a proxy. Change-Id: Iedf554acef841f52c1f2e3401ef0a0583ac5253b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* HttpClientConnection: Don't use deprecated HttpClient classesDavid Pursehouse2016-09-222-45/+60
| | | | | | | | | - raise minimum version for HttpClient packages to 4.3 since some of the used classes aren't available in older versions - recompute OSGi uses clauses Change-Id: I8f0bff1433762561e02f7439db27a6a9e846c290 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Change JGit minimum execution environment to JavaSE-1.8Matthias Sohn2016-09-203-5/+5
| | | | | Bug: 500059 Change-Id: I47f3f6749a67da52029f84e002d9b155ed56d2b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.6.0-SNAPSHOT buildsMatthias Sohn2016-09-192-6/+6
| | | | | Change-Id: Id2eafc331ee32c332c2a9b867b05c260beb0d10f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix HttpClientConnection leaking temporary buffer filesMatthias Sohn2016-08-242-12/+33
| | | | | | | | | | HttpClientConnection uses a TemporaryBufferEntity which uses TemporaryBuffer.LocalFile to buffer an HttpEntity. It was leaking temporary files if the buffered entities were larger than 1MB since it failed to destroy the TemporaryBuffer.LocalFile. Bug: 500079 Change-Id: Ib963e04efc252bdd0420a5c69b1a19181e9e6169 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Ignore 'The value of exception parameter is not used' warningDavid Pursehouse2016-07-261-0/+1
| | | | | Change-Id: I50407e4a33e35b718ca40503fdd436f1f9f70fba Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.5.0-SNAPSHOT buildsMatthias Sohn2016-06-012-6/+6
| | | | | Change-Id: I572fe9fea0e5ca0bec4648c916ae95a5b1ccf125 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.4.0-SNAPSHOT buildsMatthias Sohn2016-04-082-6/+6
| | | | | Change-Id: If3162f4cc4ae6319b9f1e3293549485b039cfe7f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.3.1-SNAPSHOT versionsMatthias Sohn2016-04-082-6/+6
| | | | | Change-Id: I52c98ba8fb3a303269a1f9380af114b6dd8c5009 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201604071810-rv4.3.0.201604071810-rMatthias Sohn2016-04-082-2/+2
| | | | | Change-Id: I902cdf1ff92ce8c6e9d80c4965d8d5bd8b9ac6c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201604071045-rMatthias Sohn2016-04-072-2/+2
| | | | | Change-Id: Iafab78d6be34d31a13f979b7be67611135c0f8bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.3-SNAPSHOT buildsMatthias Sohn2016-04-052-2/+2
| | | | | Change-Id: Ib831f8870938113bd5338763f90a07d5c108b1de Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201603230630-rc1v4.3.0.201603230630-rc1Matthias Sohn2016-03-232-2/+2
| | | | | Change-Id: I10835e5aa3618e5033424595942cc1649152cb24 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add support for HEAD requests to HttpClientConnectionMatthias Sohn2016-02-041-4/+12
| | | | | Change-Id: I501f37e06b686a3a0bb5fd857dd72e424da91d3e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove unused dependency to commons loggingRĂ¼diger Herrmann2016-01-242-3/+1
| | | | | Signed-off-by: RĂ¼diger Herrmann <ruediger.herrmann@gmx.de> Change-Id: Ibbca0f7023350a5d424b6a5a84a5d11845a8ded7
* Prepare 4.3.0-SNAPSHOT buildsMatthias Sohn2016-01-212-6/+6
| | | | | Change-Id: Idcf0479529693b023042becd96698f9afd344bd4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* buck: build standalone jgit binaryShawn Pearce2015-12-311-0/+12
| | | | | | | | | | Construct the java_application JAR wrapped with the shell script header. This is enough to clone a repository over HTTPs: $ buck build :jgit_bin $ buck-out/gen/jgit_bin/jgit_bin clone https://... Change-Id: I4aceb4e77b2ec9be76a32ec93d94f2dafe9acce6
* Fix NPE in HttpSupportMatthias Sohn2015-12-161-13/+14
| | | | | Bug: 483366 Change-Id: I107f1b44e0e6371e3cfbd1cc18a970412e1fc679 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix push with jgit pgm failing with "unauthorized"Matthias Sohn2015-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pushing with JGit commandline to e.g. Github failed with "unauthorized" since HttpUrlConnection calls the configured authenticator implicitly. The problem is that during a push two requests are sent to the server, first a GET and then a POST (containing the pack data). The first GET request sent anonymously is rejected with 401 (unauthorized). When an Authenticator is installed the java.net classes will use the Authenticator to ask the user for credentials and retry the request. But this happens under the hood and JGit level code doesn't see that this happens. The next request is the POST but since JGit thinks the first GET request went through anonymously it doesn't add authentication headers to the POST request. This POST of course also fails with 401 but since this request contains a lot of body-data streamed from JGit (the pack file!) the java.net classes can't simply retry the request with authorization headers. The whole process fails. Fix this by using Apache httpclient which doesn't use Authenticator to retrieve credentials. Instead initialize TransportCommand to use the default credential provider if no other credentials provider was set explicitly. org.eclipse.jgit.pgm.Main sets this default for the JGit command line client. Change-Id: Ic4e0f8b60d4bd6e69d91eae0c7e1b44cdf851b00 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use japicmp instead of clirr to detect API changesMatthias Sohn2015-10-011-16/+84
| | | | | | | Clirr doesn't support Java 8 hence use japicmp instead. See https://github.com/siom79/japicmp Change-Id: If4b30a6d6aa849b4d6b3b0c900558c609822840c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.2.0-SNAPSHOT buildsMatthias Sohn2015-09-282-6/+6
| | | | | Change-Id: If559d3565b1f84c93a533e1ce18d5293605d1950 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.1.1-SNAPSHOT buildsMatthias Sohn2015-09-282-6/+6
| | | | | Change-Id: I035f3a8d0f0de86e8b8f00e668be5ce008402e82 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.1.0.201509280440-rv4.1.0.201509280440-rMatthias Sohn2015-09-282-2/+2
| | | | | Change-Id: I9a536870b9f5c1247c52d6c976a954115982fa1c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Restore lazy Bundle-ActivationPolicy removed in 3a4a5a4eMatthias Sohn2015-08-311-0/+1
| | | | | | | | This header was removed unintentionally from some bundles in 3a4a5a4e57f41c595ba950ea6f6680260669bf34. Restore it to ensure lazy activation of bundles. Change-Id: I1f841f978fb93278e3ec0533a01f1363510dd976 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update uses-clauses in OSGi manifestsMatthias Sohn2015-08-311-1/+2
| | | | | | | | | | In Bug 476164 it was reported that EGit doesn't start when the platform comes with jsch 0.1.51 while this version of EGit/JGit brings jsch 0.1.53. This could be caused by outdated uses-clauses. Hence recompute them using PDE tooling. Bug: 476164 Change-Id: I185ba097884ead9cd034eba842bd3bf34181a99b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.1.0-SNAPSHOT buildsMatthias Sohn2015-06-032-6/+6
| | | | | Change-Id: I03d08b8e2d3400d4b5cdb4ab541b312870776843 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Set minimum required Java version to Java 7Matthias Sohn2015-02-094-14/+5
| | | | | | Bug: 458475 Change-Id: Iea8f2236d4e6a94a8d14bb8cc685006ea3fd1bb7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.0.0-SNAPSHOT buildsMatthias Sohn2015-01-272-6/+6
| | | | | Change-Id: I414ba8ccc82866d3107ba7083a567ea70c879bdf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.7.0-SNAPSHOT buildsMatthias Sohn2014-12-242-6/+6
| | | | | Change-Id: Ib3e7b5f46ee1e27b9cf25b3b2d01d681a5c4904c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.6.1-SNAPSHOT buildsMatthias Sohn2014-12-232-6/+6
| | | | | Change-Id: Ie620c90ffafbffc6755b4e1ed55a61a15b118a2a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.6.0.201412230720-rv3.6.0.201412230720-rMatthias Sohn2014-12-232-2/+2
| | | | | Change-Id: Ic28e2bbbdb1099e948c64a005c39f6b8d8ac69a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-3.5' into stable-3.6Matthias Sohn2014-12-191-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.5: JGit v3.5.3.201412180710-r JGit v3.4.2.201412180340-r ObjectChecker: Disallow names potentially mapping to ".git" on HFS+ ObjectChecker: Disallow Windows shortname "GIT~1" ObjectChecker: Disallow ".git." and ".git<space>" Always ignore case when forbidding .git in ObjectChecker DirCache: Refuse to read files with invalid paths DirCache: Replace isValidPath with DirCacheCheckout.checkValidPath Replace "a." with "a-" in unit tests Apache HttpClientConnection: replace calls to deprecated LocalFile() Fix two nits about DirCacheEntry constructors Detect buffering failures while writing rebase todo file Deprecate TemporaryBuffer.LocalFile without parent directory Switch FileHeader.extractFileLines to TemporaryBuffer.Heap AmazonS3: Buffer pushed pack content under $GIT_DIR DirCache: Buffer TREE extension to $GIT_DIR Change-Id: Iee8acbaa9d4d9047b550641db1b8845d64530785 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.5.3.201412180710-rv3.5.3.201412180710-rstable-3.5Matthias Sohn2014-12-182-2/+2
| | | | | | | | | | Change-Id: Iadbd460da494c04fba71f98c200d6b65ce1709c6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-3.4' into stable-3.5Matthias Sohn2014-12-181-3/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.4: JGit v3.4.2.201412180340-r ObjectChecker: Disallow names potentially mapping to ".git" on HFS+ ObjectChecker: Disallow Windows shortname "GIT~1" ObjectChecker: Disallow ".git." and ".git<space>" Always ignore case when forbidding .git in ObjectChecker DirCache: Refuse to read files with invalid paths DirCache: Replace isValidPath with DirCacheCheckout.checkValidPath Replace "a." with "a-" in unit tests Apache HttpClientConnection: replace calls to deprecated LocalFile() Fix two nits about DirCacheEntry constructors Detect buffering failures while writing rebase todo file Deprecate TemporaryBuffer.LocalFile without parent directory Switch FileHeader.extractFileLines to TemporaryBuffer.Heap AmazonS3: Buffer pushed pack content under $GIT_DIR DirCache: Buffer TREE extension to $GIT_DIR Change-Id: I398cf40b006a05a6537788fc6eb1f84df1ed8814 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v3.4.2.201412180340-rv3.4.2.201412180340-rstable-3.4Matthias Sohn2014-12-182-2/+2
| | | | | | | | | | | | | | | Change-Id: Ie088cf129b04ec64738edbc8c3ce25aa43b557ca Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Apache HttpClientConnection: replace calls to deprecated LocalFile()Matthias Sohn2014-11-261-3/+3
| | | | | | | | | | | | Change-Id: I79f422e004f386b3f2875de6997e5a0949fff566
| | * Prepare 3.4.2-SNAPSHOT buildsMatthias Sohn2014-06-212-6/+6
| | | | | | | | | | | | | | | Change-Id: If88217d84b88cda6d04c159418d5bc86233fe28c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v3.4.1.201406201815-rv3.4.1.201406201815-rMatthias Sohn2014-06-212-6/+6
| | | | | | | | | | | | | | | Change-Id: I4383a90fd91a243cd5ce5d0ae4e53874b36c1f47 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare post 3.4.0 buildsMatthias Sohn2014-06-112-2/+2
| | | | | | | | | | | | Change-Id: I49f3741f3973b247a635f7c99b72309d2381a377 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v3.4.0.201406110918-rv3.4.0.201406110918-rMatthias Sohn2014-06-112-2/+2
| | | | | | | | | | | | | | | Change-Id: I56543234316f04bff4e45628bcb8286a6e52e31f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>