163 Commits

Author SHA1 Message Date
Daniel Fuchs
5ff1d227bb 8286386: Address possibly lossy conversions in java.net.http
Reviewed-by: rriggs, michaelm, prappo
2022-05-12 18:36:02 +00:00
Daniel Fuchs
5291ec8d56 8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task
Reviewed-by: jpai, michaelm
2022-04-20 13:09:45 +00:00
XenoAmess
87faa85c59 8186958: Need method to create pre-sized HashMap
Reviewed-by: chegar, naoto, joehw, lancea, wetmore, smarks
2022-04-19 00:03:56 +00:00
Conor Cleary
4d2cd26ab5 8263031: HttpClient throws Exception if it receives a Push Promise that is too large
Reviewed-by: dfuchs
2022-04-07 08:42:38 +00:00
Conor Cleary
e0a86699b3 8281223: Improve the API documentation of HttpRequest.Builder::build to state that the default implementation provided by the JDK returns immutable objects.
Reviewed-by: dfuchs, jpai, chegar
2022-03-31 04:28:22 +00:00
Xue-Lei Andrew Fan
4df67426ed 8282723: Add constructors taking a cause to JSSE exceptions
Reviewed-by: wetmore, iris
2022-03-20 06:46:13 +00:00
Daniel Fuchs
710653ce18 8254786: java/net/httpclient/CancelRequestTest.java failing intermittently
Reviewed-by: jpai, michaelm
2022-03-15 12:59:54 +00:00
Andrey Turbanov
47b1c51bbd 8277120: Use Optional.isEmpty instead of !Optional.isPresent in java.net.http
Reviewed-by: dfuchs
2022-01-21 08:53:37 +00:00
Tim Prinzing
b8ac0d20ce 8276681: Additional malformed Javadoc inline tags in JDK source
Reviewed-by: lancea
2021-12-02 21:22:43 +00:00
Daniel Fuchs
03debf2775 8276774: Cookie stored in CookieHandler not sent if user headers contain cookie
Reviewed-by: michaelm
2021-11-19 13:18:12 +00:00
Jaikiran Pai
23e5117a55 8276559: (httpclient) Consider adding an HttpRequest.Builder.HEAD method to build a HEAD request.
Reviewed-by: cstein, dfuchs
2021-11-17 03:20:40 +00:00
Julia Boes
ee49963258 8275534: com.sun.net.httpserver.BasicAuthenticator should check whether "realm" is a quoted string
Reviewed-by: michaelm, dfuchs
2021-11-04 11:31:51 +00:00
Daniel Fuchs
7115892f96 8276401: Use blessed modifier order in java.net.http
Reviewed-by: prappo, rriggs
2021-11-03 16:23:57 +00:00
Andrey Turbanov
19f76c215d 8275079: Remove unnecessary conversion to String in java.net.http
Reviewed-by: dfuchs
2021-10-26 16:40:55 +00:00
Andrey Turbanov
d04d4ee2c1 8274894: Use Optional.empty() instead of ofNullable(null) in HttpResponse.BodySubscribers.discarding
Reviewed-by: dfuchs
2021-10-12 11:14:31 +00:00
Michael McMahon
16e83058ca 8273059: Redundant Math.min call in Http2ClientImpl#getConnectionWindowSize
Reviewed-by: dfuchs
2021-08-30 08:57:17 +00:00
Sergei Ustimenko
2309b7d8fc 8253178: Replace LinkedList Impl in net.http.FilterFactory
Reviewed-by: dfuchs
2021-08-24 14:49:56 +00:00
Daniel Fuchs
db9834ff82 8258951: java/net/httpclient/HandshakeFailureTest.java failed with "RuntimeException: Not found expected SSLHandshakeException in java.io.IOException"
Reviewed-by: chegar
2021-08-20 09:05:00 +00:00
Sergey Bylokhov
ec2fc384e5 8272120: Avoid looking for standard encodings in "java." modules
Reviewed-by: alanb, dfuchs, naoto
2021-08-12 05:46:00 +00:00
Christoph Langer
ca806ef319 8263531: Remove unused buffer int
Reviewed-by: chegar, vtewari, wetmore
2021-07-13 16:55:54 +00:00
Michael McMahon
2d088fa91d 8268294: Reusing HttpClient in a WebSocket.Listener hangs.
Reviewed-by: dfuchs
2021-06-17 07:13:59 +00:00
Weijun Wang
6765f90250 8266459: Implement JEP 411: Deprecate the Security Manager for Removal
Co-authored-by: Sean Mullan <mullan@openjdk.org>
Co-authored-by: Lance Andersen <lancea@openjdk.org>
Co-authored-by: Weijun Wang <weijun@openjdk.org>
Reviewed-by: erikj, darcy, chegar, naoto, joehw, alanb, mchung, kcr, prr, lancea
2021-06-02 11:57:31 +00:00
Daniel Fuchs
d4b4caecad 8268023: Improve diagnostic for HandshakeFailureTest
Reviewed-by: chegar
2021-06-01 17:55:36 +00:00
Daniel Fuchs
9d8ad2ed62 8267990: Revisit some uses of synchronized in the HttpClient API
Reviewed-by: chegar
2021-06-01 17:10:38 +00:00
Daniel Fuchs
24bf35f862 8265367: [macos-aarch64] 3 java/net/httpclient/websocket tests fail with "IOException: No buffer space available"
Reviewed-by: chegar
2021-05-28 14:21:11 +00:00
Daniel Fuchs
0544a732a4 8255227: java/net/httpclient/FlowAdapterPublisherTest.java intermittently failing with TestServer: start exception: java.io.IOException: Invalid preface
Reviewed-by: chegar
2021-04-30 17:21:55 +00:00
Rahul Yadav
8d0faaf91a 8257001: Improve Http Client Support
Reviewed-by: chegar, dfuchs, rhalade
2021-04-20 21:45:53 +00:00
Michael McMahon
e55aa41f57 8263899: HttpClient throws NPE in AuthenticationFilter when parsing www-authenticate head
Reviewed-by: dfuchs, chegar
2021-03-24 11:59:19 +00:00
Michael McMahon
bd7a184b98 8263442: Potential bug in jdk.internal.net.http.common.Utils.CONTEXT_RESTRICTED
Reviewed-by: dfuchs
2021-03-23 13:25:56 +00:00
Daniel Fuchs
0d2dbd2995 8262027: Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool
Reviewed-by: chegar, michaelm
2021-02-24 10:50:35 +00:00
Yasumasa Suenaga
e3b548a68b 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens
Reviewed-by: dfuchs, chegar
2021-01-15 01:58:36 +00:00
Aleksei Efimov
b040a3d7a9 8259631: Reapply pattern match instanceof use in HttpClientImpl
Reviewed-by: dfuchs, chegar
2021-01-14 11:57:48 +00:00
Chris Hegarty
be41468c83 8258696: Temporarily revert use of pattern match instanceof until docs-reference is fixed
Reviewed-by: rriggs, dcubed, bpb, jjg, dfuchs, aefimov
2020-12-18 19:49:28 +00:00
Daniel Fuchs
3f77a6002e 8258582: HttpClient: the HttpClient doesn't explicitly shutdown its default executor when stopping.
Reviewed-by: chegar, michaelm
2020-12-17 22:33:38 +00:00
Roger Riggs
aa9c136d67 8251989: Hex formatting and parsing utility
Reviewed-by: tvaleev, chegar, naoto, darcy
2020-12-16 20:29:49 +00:00
Daniel Fuchs
4a839e95de 8256459: java/net/httpclient/ManyRequests.java and java/net/httpclient/LineBodyHandlerTest.java fail infrequently with java.net.ConnectException: Connection timed out: no further information
Reviewed-by: chegar
2020-12-10 10:09:29 +00:00
Kartik Ohri
ac54900849 8257401: Use switch expressions in jdk.internal.net.http and java.net.http
Reviewed-by: chegar, dfuchs, pconcannon
2020-12-04 15:15:56 +00:00
Andrey Turbanov
c6f93ec9f2 8257707: Fix incorrect format string in Http1HeaderParser
Reviewed-by: shade
2020-12-04 10:19:30 +00:00
Patrick Concannon
9fe2d31d6e 8252304: Seed an HttpRequest.Builder from an existing HttpRequest
Co-authored-by: Chris Hegarty <chegar@openjdk.org>
Reviewed-by: chegar, dfuchs, michaelm
2020-11-19 09:35:49 +00:00
Daniel Fuchs
1c47244b01 8255244: HttpClient: Response headers contain incorrectly encoded Unicode characters
Reviewed-by: chegar, michaelm
2020-11-13 15:10:41 +00:00
Sergey Tsypanov
3c4fc79326 8255299: Drop explicit zeroing at instantiation of Atomic* objects
Reviewed-by: redestad, serb, prr
2020-10-28 12:11:53 +00:00
Daniel Fuchs
6ed4c89dc8 8254704: Add missing @since tag to BodyPublishers::concat
Reviewed-by: chegar
2020-10-13 16:53:40 +00:00
Daniel Fuchs
4184959d85 8252374: Add a new factory method to concatenate a sequence of BodyPublisher instances into a single publisher.
Reviewed-by: chegar
2020-10-12 12:52:55 +00:00
Conor Cleary
703b345eee 8253179: Replace LinkedList Impl in net.http.Http2Connection
Reviewed-by: dfuchs, prappo, chegar, shade
2020-10-07 06:21:53 +00:00
Daniel Fuchs
80d889189a 8245462: HttpClient send throws InterruptedException when interrupted but does not cancel request
Allows an HTTP operation to be cancelled by calling CompletableFuture::cancel(true)

Reviewed-by: michaelm, chegar, alanb
2020-08-28 10:48:17 +01:00
Conor Cleary
3fb8f4364d 8246047: Replace LinkedList impl in net.http.websocket.BuilderImpl
Replaced usages of LinkedList with ArrayList in http.websocket.BuilderImpl

Reviewed-by: chegar, dfuchs
2020-08-19 16:27:16 +01:00
Rahul Yadav
b328bc14a0 8251715: Throw UncheckedIOException in place of InternalError when HttpClient fails due to unavailability of underlying resources required by SSLContext
This fix updates jdk.internal.net.http.HttpClientImpl to throw an UncheckedIOException instead of InternalError.

Reviewed-by: chegar, dfuchs
2020-08-18 16:44:42 +01:00
Rahul Yadav
8e687450d6 8248006: Revisit exceptions thrown when creating an HttpClient fails due to unavailability of underlying resources
This fix updates jdk.internal.net.http.HttpClientImpl to throw an UncheckedIOException instead of InternalError.

Reviewed-by: chegar, dfuchs
2020-08-10 15:15:10 +01:00
Daniel Fuchs
77c46ea911 8229822: ThrowingPushPromises tests sometimes fail due to EOF
SocketTube is fixed to cater for errors caused by pausing/resuming events on an asynchronously closed connection, from within the selector's manager thread. Http2Connection and Stream are fixed to prevent sending a DataFrame on a stream after Reset has been sent.

Reviewed-by: chegar
2020-08-07 16:16:45 +01:00
Daniel Fuchs
45c89daf72 8249786: java/net/httpclient/websocket/PendingPingTextClose.java fails very infrequently
TransportImpl is modified to make sure the CLOSED state is recorded before the channel is closed. The tests are modified to enable their retry mechanism on windows, similar to what was done previously for macOS.

Reviewed-by: prappo, chegar
2020-08-07 15:09:19 +01:00