Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Restrict cases where to do HTTP retries

This commit restricts the number of cases where we're going to perform HTTP retries. Instead of any error,

we will now retry when:

- a connection timeout occurs (client or server)

- the server responds an error code between 500 and 600

- response code is a too many requests error

Fixes #7850

  1. … 4 more files in changeset.
Use last redirect location for HTTP failures

Instead of including the original HTTP request URI, the bottommost

exception for failed HTTP requests now includes the URI of the last

redirect location, if any.

    • -0
    • +85
    ./internal/resource/transport/http/HttpClientResponse.java
  1. … 8 more files in changeset.
De-incubate 3.x package-info files

And files we missed due to moving things to coreApi.

    • -1
    • +0
    ./authentication/http/package-info.java
  1. … 32 more files in changeset.
De-incubate 2.x authentication API

    • -2
    • +0
    ./authentication/http/BasicAuthentication.java
    • -2
    • +0
    ./authentication/http/DigestAuthentication.java
  1. … 3 more files in changeset.
Replace deprectated `IOUtils.closeQuietly` uses with `IoActions.closeQuietly`

  1. … 20 more files in changeset.
Enable TLSv1.2 for HTTPS on IBM JDK 8

By default, IBM JDK 8 doesn't enable TLSv1.2, which results in

`fatal alert: protocol_version` when communicating with maven central.

This commit enables TLSv1.2 for HTTPS on IBM JDK 8.

Enable TLSv1.2 for HTTPS on IBM JDK 8

By default, IBM JDK 8 doesn't enable TLSv1.2, which results in

`fatal alert: protocol_version` when communicating with maven central.

This commit enables TLSv1.2 for HTTPS on IBM JDK 8.

Fix handling of InterruptedExceptions

These exceptions were handled incorrectly throughout the whole

codebase, usually rethrown without restoring the interrupt status

or discarded entirely. This means that the system would not stop

executing even though the user wanted it to. In some cases this

also left the system in an inconsistent state, leading to deadlocks.

The most notable changes include:

- UncheckedException.rethrow automatically restores the interrupt status

- AsyncDispatch is guaranteed to deliver its messages, even when interrupted

- ExecHandle cancels the started process if it is interrupted while waiting

- ExecHandle disconnects from the process' output before killing it

- The worker API cancels the started work items if it is interrupted

- ManagedExecutors shut down immediately if they are interrupted while stopping

- We no longer log exceptions caused by interruption to the console

- Interrupting our caches no longer leaks file locks

  1. … 38 more files in changeset.
Use TCP keep-alive for http connections

So that a proxy or MITM doesn't terminate the connections so easily.

Issue #6461

  1. … 1 more file in changeset.
Modified the changes to conform with pull request changes request

Signed-off-by: Jakub Strzyżewski <github@jeikobu.net>

  1. … 1 more file in changeset.
Added a nullcheck for username and an appropriate exception to avoid a NullPointerException when username is null

Signed-off-by: Jakub Strzyżewski <github@jeikobu.net>

  1. … 1 more file in changeset.
Evict expired connections in HTTP client

Signed-off-by: Lukasz Sanek <lukasz.sanek@workday.com>

Support HTTP header based authentication for Maven repositories

Now it's possible to use a custom HTTP header to authorize access to

Maven repositories. This enables Gradle to access private GitLab and TFS

repositories used as Maven repositories or any OAuth2 protected Maven

repository.

Resolves #5571.

    • -0
    • +29
    ./authentication/http/HttpHeaderAuthentication.java
    • -0
    • +31
    ./internal/authentication/DefaultHttpHeaderAuthentication.java
    • -0
    • +73
    ./internal/resource/transport/http/HttpHeaderAuthScheme.java
  1. … 22 more files in changeset.
Support TLSv1.2 by default under Java 7

Following changes in Maven Central, only TLSv1.2 is accepted.

This change turns on TLSv1, TLSv1.1 and TLSv1.2 for all connections from

Gradle when the Java version is 7.

As documented in https://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html

in the Protocols section, this is safe, except for versions before 7u75

that were relying on SSLv3.

However that last protocol is really broken and no one should be using

it. And we definitely cannot turn it on here.

It also adds that property to tests that do interact with Maven Central.

Fixes #5740

  1. … 3 more files in changeset.
Build cache should not follow HTTP redirects (#3517)

  1. … 5 more files in changeset.
Gradle should fail resolution from subsequent repositories on critical errors (#3412)

  1. … 15 more files in changeset.
Increase timeout for HTTP timeouts and assign system properties to internal namespace (#3371)

Increase default HTTP timeout to 30s (#3268)

Add blacklister to repository management (#3047)

Fix https://github.com/gradle/gradle/issues/2853

Previous versions of Gradle would fall through to the next repository

if resolution in one repository failed. This may cause potentially

indeterministic resolution result. This PR changes this behaviour

and will explicitly rethrow exceptions which occur in dependency

resolution instead of quietly continue to the next repository.

What's more, this PR introduces a RepositoryBlacklister. Exceptions

thrown during dependency resolution are categoried as follows:

1. Caused by HTTP error status code (other than 2xx/3xx/404)

These exceptions would be considered as "recoverable" since

the server seems still to be able to respond.

2. Caused by other IOException/UncheckedIOException

These exceptions would be considered as "unrecoverable"

and the repository would be blacklisted in the build.

  1. … 18 more files in changeset.
Revert "Revert "Introduce HTTP timeout (#3041)""

This reverts commit 14711361a0cb6beb3a57766804c109ba6f3f87c0.

  1. … 8 more files in changeset.
Revert "Introduce HTTP timeout (#3041)"

This reverts commit 59153d58c906341cfe3b5bebbedf289e3def1e09.

  1. … 8 more files in changeset.
Introduce HTTP timeout (#3041)

Introduce HTTP connection and socket timeout

Fix https://github.com/gradle/gradle/issues/868

  1. … 8 more files in changeset.
Introduce HTTP connection and socket timeout

    • -0
    • +23
    ./internal/resource/transport/http/HttpTimeoutSettings.java
  1. … 13 more files in changeset.
Revert Http socket/connection timeouts for the release (#2879)

  1. … 14 more files in changeset.
Fix formatting issues found by checkstyle

  1. … 1 more file in changeset.
Add flag to allow untrusted ssl connections to build cache (#2790)

  1. … 7 more files in changeset.
Defines default HTTP connection and socket timeouts (#2757)

    • -0
    • +23
    ./internal/resource/transport/http/HttpTimeoutSettings.java
  1. … 14 more files in changeset.
Initialize http proxy settings on first use

By deferring this initialization, we avoid doing work when not required

and ensure that the system properties are set on the process before

being read.

  1. … 1 more file in changeset.
Replace usages of org.gradle.api.Nullable

With javax.annotation.Nullable.

  1. … 460 more files in changeset.
Rework fix for parallel downloads on authenticated repositories

This commit reworks the fix for authenticated repositories to use a queue of `HttpContext` instead of a thread local map.

The rationale for this change is that 2 subsequent requests are not necessarily executed on the same thread. This means that

if request 1 performed authentication, and request 2 is done some time later, but on a different thread, authentication is

going to be done again.

To avoid this, request 1 will ask for a context in a queue. If no context is available, a new one is added. Once the request

is done, the context is added back in the queue, making it availble for subsequent requests to pick up. Request 2 comes and

picks it from the queue, then authentication state can be reused.

This means that at most, we can re-authenticate as many times as there are concurrent requests. But in practice, it is likely

that we're going to reuse shared context.

This commit also adds an integration test proving that parallel downloads work with authenticated repositories.

  1. … 3 more files in changeset.