8262294: java/net/httpclient/ProxyAuthDisabledSchemes.java fails with HTTP/1.1 parser received no bytes
Reviewed-by: dfuchs, jpai
This commit is contained in:
parent
b3ff8d1c89
commit
2d607c9cd1
src/java.net.http/share/classes/jdk/internal/net/http
test/jdk/java/net/httpclient
@ -533,7 +533,7 @@ final class Exchange<T> {
|
||||
Function<ExchangeImpl<T>, CompletableFuture<Response>> after407Check;
|
||||
bodyIgnored = null;
|
||||
if (request.expectContinue()) {
|
||||
request.addSystemHeader("Expect", "100-Continue");
|
||||
request.setSystemHeader("Expect", "100-Continue");
|
||||
Log.logTrace("Sending Expect: 100-Continue");
|
||||
// wait for 100-Continue before sending body
|
||||
after407Check = this::expectContinue;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -360,10 +360,6 @@ public class HttpRequestImpl extends HttpRequest implements WebSocketRequest {
|
||||
@Override
|
||||
public Optional<HttpClient.Version> version() { return version; }
|
||||
|
||||
void addSystemHeader(String name, String value) {
|
||||
systemHeadersBuilder.addHeader(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSystemHeader(String name, String value) {
|
||||
systemHeadersBuilder.setHeader(name, value);
|
||||
|
@ -699,6 +699,7 @@ public abstract class DigestEchoServer implements HttpServerAdapters {
|
||||
throw new InternalError(key + ": Invalid combination scheme="
|
||||
+ schemeType + " authType=" + authType);
|
||||
}
|
||||
break;
|
||||
case NONE:
|
||||
// No authentication at all.
|
||||
ctxt.addFilter(new HttpNoAuthFilter(key, authType));
|
||||
|
@ -27,7 +27,7 @@
|
||||
* headers directly when connecting with a server, and
|
||||
* it verifies that the client honor the jdk.http.auth.*.disabledSchemes
|
||||
* net properties.
|
||||
* @bug 8087112
|
||||
* @bug 8087112 8262294
|
||||
* @library /test/lib /test/jdk/java/net/httpclient/lib
|
||||
* @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient
|
||||
* ReferenceTracker ProxyAuthDisabledSchemes
|
||||
|
Loading…
x
Reference in New Issue
Block a user