This repository was archived by the owner on Mar 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/com/cloudant/http/internal/ok Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Unreleased
2+ - [ UPGRADED] Optional OkHttp dependency to version 3.12.2.
3+
14# 2.17.0 (2019-05-23)
25- [ NEW] Added ` com.cloudant.client.api.model.DbInfo#getDocDelCountLong() ` to return
36 deleted document count as a ` long ` instead of a ` String ` .
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Gradle with [optional `okhttp-urlconnection` dependency](#optional-okhttp-depend
3030``` groovy
3131dependencies {
3232 compile group: 'com.cloudant', name: 'cloudant-client', version: '2.17.0'
33- compile group: 'com.squareup.okhttp3', name: 'okhttp-urlconnection', version: '3.8.1 '
33+ compile group: 'com.squareup.okhttp3', name: 'okhttp-urlconnection', version: '3.12.2 '
3434}
3535```
3636
@@ -55,7 +55,7 @@ Maven with [optional `okhttp-urlconnection` dependency](#optional-okhttp-depende
5555<dependency >
5656 <groupId >com.squareup.okhttp3</groupId >
5757 <artifactId >okhttp-urlconnection</artifactId >
58- <version >3.8.1 </version >
58+ <version >3.12.2 </version >
5959</dependency >
6060~~~
6161
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ dependencies {
2828 testImplementation ' org.junit.jupiter:junit-jupiter-api:5.1.0'
2929 testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.1.0'
3030 testCompile group : ' org.hamcrest' , name : ' hamcrest-library' , version : ' 1.3'
31- testCompile group : ' com.squareup.okhttp3' , name : ' mockwebserver' , version : ' 3.8.1 '
31+ testCompile group : ' com.squareup.okhttp3' , name : ' mockwebserver' , version : ' 3.12.2 '
3232 testCompile group : ' org.jmockit' , name : ' jmockit' , version : ' 1.34'
3333 testCompile group : ' org.littleshoot' , name : ' littleproxy' , version : ' 1.1.0'
3434}
Original file line number Diff line number Diff line change 1515dependencies {
1616 compile group : ' commons-io' , name : ' commons-io' , version : ' 2.4'
1717 // needed to compile, but optional for consumers of java-cloudant
18- compile(group : ' com.squareup.okhttp3' , name : ' okhttp-urlconnection' , version : ' 3.8.1 ' ) {
18+ compile(group : ' com.squareup.okhttp3' , name : ' okhttp-urlconnection' , version : ' 3.12.2 ' ) {
1919 ext. optional = true
2020 }
2121}
Original file line number Diff line number Diff line change 11/*
2- * Copyright © 2016 IBM Corp. All rights reserved.
2+ * Copyright © 2016, 2019 IBM Corp. All rights reserved.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
55 * except in compliance with the License. You may obtain a copy of the License at
@@ -33,17 +33,12 @@ class ProxyAuthenticator implements Authenticator {
3333
3434 @ Override
3535 public Request authenticate (Route route , Response response ) throws IOException {
36- if (route .proxy () != null ) {
37- if (creds .equals (response .request ().header ("Proxy-Authorization" ))) {
38- // If the proxy creds have already been tried then give up
39- return null ;
40- } else {
41- return response .request ().newBuilder ().addHeader (ProxyAuthInterceptor
42- .PROXY_AUTH_HEADER , creds ).build ();
43- }
44- } else {
45- // Don't interfere with normal Auth, this is just for proxies
36+ if (creds .equals (response .request ().header ("Proxy-Authorization" ))) {
37+ // If the proxy creds have already been tried then give up
4638 return null ;
39+ } else {
40+ return response .request ().newBuilder ().addHeader (ProxyAuthInterceptor
41+ .PROXY_AUTH_HEADER , creds ).build ();
4742 }
4843 }
4944}
You can’t perform that action at this time.
0 commit comments