You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ktor Version and Engine Used (client or server and name)
io.ktor:ktor-client-apache:1.2.3-rc
io.ktor:ktor-client-apache:1.2.2
org.apache.httpcomponents:httpasyncclient:4.1.3
Describe the bug
When using Ktor http client with http proxy (with basic auth), some of requests to https web sites are failing with "java.lang.IllegalArgumentException: Auth scheme may not be null":
java.lang.IllegalArgumentException: Auth scheme may not be null
at |b|b|b(Coroutine boundary.|b(|b)
at io.ktor.client.engine.apache.ApacheEngine.execute(ApacheEngine.kt:23)
at io.ktor.client.engine.HttpClientEngine$install$1.invokeSuspend(HttpClientEngine.kt:49)
at io.ktor.client.features.logging.Logging$Companion$install$1.invokeSuspend(Logging.kt:151)
at io.ktor.client.features.HttpSend$DefaultSender.execute(HttpSend.kt:90)
at io.ktor.client.features.HttpSend$Feature$install$1.invokeSuspend(HttpSend.kt:62)
at io.ktor.client.features.HttpCallValidator$Companion$install$1.invokeSuspend(HttpCallValidator.kt:87)
at io.ktor.client.HttpClient.execute(HttpClient.kt:141)
at io.ktor.client.call.HttpClientCallKt.call(HttpClientCall.kt:140)
at t.p.s.f.BugReportTest$getNested$2$1$1.invokeSuspend(BugReportTest.kt:59)
at t.p.s.f.BugReportTest$testClient$1$1$1.invokeSuspend(BugReportTest.kt:83)
Caused by: java.lang.IllegalArgumentException: Auth scheme may not be null
at org.apache.http.util.Args.notNull(Args.java:54)
at org.apache.http.impl.client.AuthenticationStrategyImpl.authSucceeded(AuthenticationStrategyImpl.java:215)
at org.apache.http.impl.client.ProxyAuthenticationStrategy.authSucceeded(ProxyAuthenticationStrategy.java:44)
at org.apache.http.impl.auth.HttpAuthenticator.isAuthenticationRequested(HttpAuthenticator.java:88)
at org.apache.http.impl.nio.client.MainClientExec.needAuthentication(MainClientExec.java:629)
at org.apache.http.impl.nio.client.MainClientExec.handleResponse(MainClientExec.java:569)
at org.apache.http.impl.nio.client.MainClientExec.responseReceived(MainClientExec.java:309)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseReceived(DefaultClientExchangeHandlerImpl.java:151)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.responseReceived(HttpAsyncRequestExecutor.java:306)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:255)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:121)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
at java.lang.Thread.run(Thread.java:748)
To Reproduce
Steps to reproduce the behavior:
Run following test with http proxy (with basic auth) BugReportTest. Number of parallel requests until exception may differ.
Expected behavior
No errors or exceptions occurred.
The text was updated successfully, but these errors were encountered:
@e5l, thanks for suggestion, but does it work for proxy authentication? Because i've got io.ktor.client.features.ClientRequestException: Client request(https://jsonplaceholder.typicode.com/) invalid: 407 Proxy Authentication Required using Auth feature and setting proxy server address in Apache configuration.
Ktor Version and Engine Used (client or server and name)
io.ktor:ktor-client-apache:1.2.3-rc
io.ktor:ktor-client-apache:1.2.2
org.apache.httpcomponents:httpasyncclient:4.1.3
Describe the bug
When using Ktor http client with http proxy (with basic auth), some of requests to https web sites are failing with "java.lang.IllegalArgumentException: Auth scheme may not be null":
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No errors or exceptions occurred.
The text was updated successfully, but these errors were encountered: