mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
8191494: Refresh incubating HTTP Client
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com> Co-authored-by: Michael McMahon <michael.x.mcmahon@oracle.com> Co-authored-by: Pavel Rappo <pavel.rappo@oracle.com> Reviewed-by: chegar, dfuchs, michaelm
This commit is contained in:
parent
2c9ed8e178
commit
37811b7460
301 changed files with 27018 additions and 11801 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2017, 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
|
||||
|
@ -551,9 +551,11 @@ class ServerImpl implements TimeSource {
|
|||
requestLine = req.requestLine();
|
||||
if (requestLine == null) {
|
||||
/* connection closed */
|
||||
logger.log(Level.DEBUG, "no request line: closing");
|
||||
closeConnection(connection);
|
||||
return;
|
||||
}
|
||||
logger.log(Level.DEBUG, "Exchange request line: {0}", requestLine);
|
||||
int space = requestLine.indexOf (' ');
|
||||
if (space == -1) {
|
||||
reject (Code.HTTP_BAD_REQUEST,
|
||||
|
@ -797,7 +799,8 @@ class ServerImpl implements TimeSource {
|
|||
// fashion.
|
||||
|
||||
void requestCompleted (HttpConnection c) {
|
||||
assert c.getState() == State.REQUEST;
|
||||
State s = c.getState();
|
||||
assert s == State.REQUEST : "State is not REQUEST ("+s+")";
|
||||
reqConnections.remove (c);
|
||||
c.rspStartedTime = getTime();
|
||||
rspConnections.add (c);
|
||||
|
@ -806,7 +809,8 @@ class ServerImpl implements TimeSource {
|
|||
|
||||
// called after response has been sent
|
||||
void responseCompleted (HttpConnection c) {
|
||||
assert c.getState() == State.RESPONSE;
|
||||
State s = c.getState();
|
||||
assert s == State.RESPONSE : "State is not RESPONSE ("+s+")";
|
||||
rspConnections.remove (c);
|
||||
c.setState (State.IDLE);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue