fix typo and grammar (#4045)
Signed-off-by: KangZhiDong <worldkzd@gmail.com>
This commit is contained in:
parent
bb7eb4bc86
commit
49ba6d1acb
|
@ -173,7 +173,7 @@ public class TestSecurityAnnotationConversions
|
||||||
public void testMethodAnnotation() throws Exception
|
public void testMethodAnnotation() throws Exception
|
||||||
{
|
{
|
||||||
//ServletSecurity annotation with HttpConstraint of TransportGuarantee.CONFIDENTIAL, and a list of rolesAllowed, and
|
//ServletSecurity annotation with HttpConstraint of TransportGuarantee.CONFIDENTIAL, and a list of rolesAllowed, and
|
||||||
//a HttpMethodConstraint for GET method that permits all and has TransportGuarantee.NONE (ie is default)
|
//an HttpMethodConstraint for GET method that permits all and has TransportGuarantee.NONE (ie is default)
|
||||||
|
|
||||||
WebAppContext wac = makeWebAppContext(Method1Servlet.class.getCanonicalName(), "method1Servlet", new String[]{
|
WebAppContext wac = makeWebAppContext(Method1Servlet.class.getCanonicalName(), "method1Servlet", new String[]{
|
||||||
"/foo/*", "*.foo"
|
"/foo/*", "*.foo"
|
||||||
|
|
|
@ -28,7 +28,7 @@ import org.eclipse.jetty.io.ClientConnectionFactory;
|
||||||
* in order to plug-in a different transport for {@link HttpClient}.
|
* in order to plug-in a different transport for {@link HttpClient}.
|
||||||
* <p>
|
* <p>
|
||||||
* While the {@link HttpClient} APIs define the HTTP semantic (request, response, headers, etc.)
|
* While the {@link HttpClient} APIs define the HTTP semantic (request, response, headers, etc.)
|
||||||
* <em>how</em> a HTTP exchange is carried over the network depends on implementations of this class.
|
* <em>how</em> an HTTP exchange is carried over the network depends on implementations of this class.
|
||||||
* <p>
|
* <p>
|
||||||
* The default implementation uses the HTTP protocol to carry over the network the HTTP exchange,
|
* The default implementation uses the HTTP protocol to carry over the network the HTTP exchange,
|
||||||
* but the HTTP exchange may also be carried using the FCGI protocol, the HTTP/2 protocol or,
|
* but the HTTP exchange may also be carried using the FCGI protocol, the HTTP/2 protocol or,
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
/**
|
/**
|
||||||
* {@link HttpContent} is a stateful, linear representation of the request content provided
|
* {@link HttpContent} is a stateful, linear representation of the request content provided
|
||||||
* by a {@link ContentProvider} that can be traversed one-way to obtain content buffers to
|
* by a {@link ContentProvider} that can be traversed one-way to obtain content buffers to
|
||||||
* send to a HTTP server.
|
* send to an HTTP server.
|
||||||
* <p>
|
* <p>
|
||||||
* {@link HttpContent} offers the notion of a one-way cursor to traverse the content.
|
* {@link HttpContent} offers the notion of a one-way cursor to traverse the content.
|
||||||
* The cursor starts in a virtual "before" position and can be advanced using {@link #advance()}
|
* The cursor starts in a virtual "before" position and can be advanced using {@link #advance()}
|
||||||
|
|
|
@ -51,7 +51,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
* <ol>
|
* <ol>
|
||||||
* <li>{@link #responseBegin(HttpExchange)}, when the HTTP response data containing the HTTP status code
|
* <li>{@link #responseBegin(HttpExchange)}, when the HTTP response data containing the HTTP status code
|
||||||
* is available</li>
|
* is available</li>
|
||||||
* <li>{@link #responseHeader(HttpExchange, HttpField)}, when a HTTP field is available</li>
|
* <li>{@link #responseHeader(HttpExchange, HttpField)}, when an HTTP field is available</li>
|
||||||
* <li>{@link #responseHeaders(HttpExchange)}, when all HTTP headers are available</li>
|
* <li>{@link #responseHeaders(HttpExchange)}, when all HTTP headers are available</li>
|
||||||
* <li>{@link #responseContent(HttpExchange, ByteBuffer, Callback)}, when HTTP content is available</li>
|
* <li>{@link #responseContent(HttpExchange, ByteBuffer, Callback)}, when HTTP content is available</li>
|
||||||
* <li>{@link #responseSuccess(HttpExchange)}, when the response is successful</li>
|
* <li>{@link #responseSuccess(HttpExchange)}, when the response is successful</li>
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class HttpRedirector
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param response the response to check for redirects
|
* @param response the response to check for redirects
|
||||||
* @return whether the response code is a HTTP redirect code
|
* @return whether the response code is an HTTP redirect code
|
||||||
*/
|
*/
|
||||||
public boolean isRedirect(Response response)
|
public boolean isRedirect(Response response)
|
||||||
{
|
{
|
||||||
|
|
|
@ -869,7 +869,7 @@ public class HttpRequest implements Request
|
||||||
}
|
}
|
||||||
catch (URISyntaxException x)
|
catch (URISyntaxException x)
|
||||||
{
|
{
|
||||||
// The "path" of a HTTP request may not be a URI,
|
// The "path" of an HTTP request may not be a URI,
|
||||||
// for example for CONNECT 127.0.0.1:8080.
|
// for example for CONNECT 127.0.0.1:8080.
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ import org.eclipse.jetty.http.HttpVersion;
|
||||||
import org.eclipse.jetty.util.Fields;
|
import org.eclipse.jetty.util.Fields;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>{@link Request} represents a HTTP request, and offers a fluent interface to customize
|
* <p>{@link Request} represents an HTTP request, and offers a fluent interface to customize
|
||||||
* various attributes such as the path, the headers, the content, etc.</p>
|
* various attributes such as the path, the headers, the content, etc.</p>
|
||||||
* <p>You can create {@link Request} objects via {@link HttpClient#newRequest(String)} and
|
* <p>You can create {@link Request} objects via {@link HttpClient#newRequest(String)} and
|
||||||
* you can send them using either {@link #send()} for a blocking semantic, or
|
* you can send them using either {@link #send()} for a blocking semantic, or
|
||||||
|
|
|
@ -29,7 +29,7 @@ import org.eclipse.jetty.http.HttpVersion;
|
||||||
import org.eclipse.jetty.util.Callback;
|
import org.eclipse.jetty.util.Callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>{@link Response} represents a HTTP response and offers methods to retrieve status code, HTTP version
|
* <p>{@link Response} represents an HTTP response and offers methods to retrieve status code, HTTP version
|
||||||
* and headers.</p>
|
* and headers.</p>
|
||||||
* <p>{@link Response} objects are passed as parameters to {@link Response.Listener} callbacks, or as
|
* <p>{@link Response} objects are passed as parameters to {@link Response.Listener} callbacks, or as
|
||||||
* future result of {@link Request#send()}.</p>
|
* future result of {@link Request#send()}.</p>
|
||||||
|
|
|
@ -161,7 +161,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a HTTP response in the receivers buffer.
|
* Parses an HTTP response in the receivers buffer.
|
||||||
*
|
*
|
||||||
* @return true to indicate that parsing should be interrupted (and will be resumed by another thread).
|
* @return true to indicate that parsing should be interrupted (and will be resumed by another thread).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -494,7 +494,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
|
||||||
.scheme(scenario.getScheme())
|
.scheme(scenario.getScheme())
|
||||||
.onResponseBegin(response1 ->
|
.onResponseBegin(response1 ->
|
||||||
{
|
{
|
||||||
// Simulate a HTTP 1.0 response has been received.
|
// Simulate an HTTP 1.0 response has been received.
|
||||||
((HttpResponse)response1).version(HttpVersion.HTTP_1_0);
|
((HttpResponse)response1).version(HttpVersion.HTTP_1_0);
|
||||||
})
|
})
|
||||||
.send();
|
.send();
|
||||||
|
|
|
@ -26,7 +26,7 @@ import javax.servlet.ServletResponseWrapper;
|
||||||
/**
|
/**
|
||||||
* Continuation.
|
* Continuation.
|
||||||
* <p>
|
* <p>
|
||||||
* A continuation is a mechanism by which a HTTP Request can be suspended and
|
* A continuation is a mechanism by which an HTTP Request can be suspended and
|
||||||
* restarted after a timeout or an asynchronous event has occurred.
|
* restarted after a timeout or an asynchronous event has occurred.
|
||||||
* <p>
|
* <p>
|
||||||
* The continuation mechanism is a portable mechanism that will work
|
* The continuation mechanism is a portable mechanism that will work
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -44,7 +44,7 @@ import org.eclipse.jetty.util.ProcessorUtils;
|
||||||
/**
|
/**
|
||||||
* Specific implementation of {@link org.eclipse.jetty.proxy.AsyncProxyServlet.Transparent} for FastCGI.
|
* Specific implementation of {@link org.eclipse.jetty.proxy.AsyncProxyServlet.Transparent} for FastCGI.
|
||||||
* <p>
|
* <p>
|
||||||
* This servlet accepts a HTTP request and transforms it into a FastCGI request
|
* This servlet accepts an HTTP request and transforms it into a FastCGI request
|
||||||
* that is sent to the FastCGI server specified in the {@code proxyTo}
|
* that is sent to the FastCGI server specified in the {@code proxyTo}
|
||||||
* init-param.
|
* init-param.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -21,7 +21,7 @@ package org.eclipse.jetty.http;
|
||||||
import org.eclipse.jetty.util.HostPort;
|
import org.eclipse.jetty.util.HostPort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HttpField holding a preparsed Host and port number
|
* An HttpField holding a preparsed Host and port number
|
||||||
*
|
*
|
||||||
* @see HostPort
|
* @see HostPort
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -23,7 +23,7 @@ import java.util.Objects;
|
||||||
import org.eclipse.jetty.util.StringUtil;
|
import org.eclipse.jetty.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HTTP Field
|
* An HTTP Field
|
||||||
*/
|
*/
|
||||||
public class HttpField
|
public class HttpField
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ public enum HttpMethod
|
||||||
* @param bytes Array containing ISO-8859-1 characters
|
* @param bytes Array containing ISO-8859-1 characters
|
||||||
* @param position The first valid index
|
* @param position The first valid index
|
||||||
* @param limit The first non valid index
|
* @param limit The first non valid index
|
||||||
* @return A HttpMethod if a match or null if no easy match.
|
* @return An HttpMethod if a match or null if no easy match.
|
||||||
*/
|
*/
|
||||||
public static HttpMethod lookAheadGet(byte[] bytes, final int position, int limit)
|
public static HttpMethod lookAheadGet(byte[] bytes, final int position, int limit)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,7 @@ public enum HttpMethod
|
||||||
* Optimized lookup to find a method name and trailing space in a byte array.
|
* Optimized lookup to find a method name and trailing space in a byte array.
|
||||||
*
|
*
|
||||||
* @param buffer buffer containing ISO-8859-1 characters, it is not modified.
|
* @param buffer buffer containing ISO-8859-1 characters, it is not modified.
|
||||||
* @return A HttpMethod if a match or null if no easy match.
|
* @return An HttpMethod if a match or null if no easy match.
|
||||||
*/
|
*/
|
||||||
public static HttpMethod lookAheadGet(ByteBuffer buffer)
|
public static HttpMethod lookAheadGet(ByteBuffer buffer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -477,7 +477,7 @@ public class HttpParser
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Quick lookahead for the start state looking for a request method or a HTTP version,
|
/* Quick lookahead for the start state looking for a request method or an HTTP version,
|
||||||
* otherwise skip white space until something else to parse.
|
* otherwise skip white space until something else to parse.
|
||||||
*/
|
*/
|
||||||
private boolean quickStart(ByteBuffer buffer)
|
private boolean quickStart(ByteBuffer buffer)
|
||||||
|
@ -1873,14 +1873,14 @@ public class HttpParser
|
||||||
boolean messageComplete();
|
boolean messageComplete();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the method called by parser when a HTTP Header name and value is found
|
* This is the method called by parser when an HTTP Header name and value is found
|
||||||
*
|
*
|
||||||
* @param field The field parsed
|
* @param field The field parsed
|
||||||
*/
|
*/
|
||||||
void parsedHeader(HttpField field);
|
void parsedHeader(HttpField field);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the method called by parser when a HTTP Trailer name and value is found
|
* This is the method called by parser when an HTTP Trailer name and value is found
|
||||||
*
|
*
|
||||||
* @param field The field parsed
|
* @param field The field parsed
|
||||||
*/
|
*/
|
||||||
|
@ -1890,7 +1890,7 @@ public class HttpParser
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to signal that an EOF was received unexpectedly
|
* Called to signal that an EOF was received unexpectedly
|
||||||
* during the parsing of a HTTP message
|
* during the parsing of an HTTP message
|
||||||
*/
|
*/
|
||||||
void earlyEOF();
|
void earlyEOF();
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import org.eclipse.jetty.util.UrlEncoded;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Http URI.
|
* Http URI.
|
||||||
* Parse a HTTP URI from a string or byte array. Given a URI
|
* Parse an HTTP URI from a string or byte array. Given a URI
|
||||||
* <code>http://user@host:port/path/info;param?query#fragment</code>
|
* <code>http://user@host:port/path/info;param?query#fragment</code>
|
||||||
* this class will split it into the following undecoded optional elements:<ul>
|
* this class will split it into the following undecoded optional elements:<ul>
|
||||||
* <li>{@link #getScheme()} - http:</li>
|
* <li>{@link #getScheme()} - http:</li>
|
||||||
|
|
|
@ -42,12 +42,12 @@ public enum HttpVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optimised lookup to find a Http Version and whitespace in a byte array.
|
* Optimised lookup to find an Http Version and whitespace in a byte array.
|
||||||
*
|
*
|
||||||
* @param bytes Array containing ISO-8859-1 characters
|
* @param bytes Array containing ISO-8859-1 characters
|
||||||
* @param position The first valid index
|
* @param position The first valid index
|
||||||
* @param limit The first non valid index
|
* @param limit The first non valid index
|
||||||
* @return A HttpMethod if a match or null if no easy match.
|
* @return An HttpMethod if a match or null if no easy match.
|
||||||
*/
|
*/
|
||||||
public static HttpVersion lookAheadGet(byte[] bytes, int position, int limit)
|
public static HttpVersion lookAheadGet(byte[] bytes, int position, int limit)
|
||||||
{
|
{
|
||||||
|
@ -84,10 +84,10 @@ public enum HttpVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optimised lookup to find a HTTP Version and trailing white space in a byte array.
|
* Optimised lookup to find an HTTP Version and trailing white space in a byte array.
|
||||||
*
|
*
|
||||||
* @param buffer buffer containing ISO-8859-1 characters
|
* @param buffer buffer containing ISO-8859-1 characters
|
||||||
* @return A HttpVersion if a match or null if no easy match.
|
* @return An HttpVersion if a match or null if no easy match.
|
||||||
*/
|
*/
|
||||||
public static HttpVersion lookAheadGet(ByteBuffer buffer)
|
public static HttpVersion lookAheadGet(ByteBuffer buffer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pre encoded HttpField.
|
* Pre encoded HttpField.
|
||||||
* <p>A HttpField that will be cached and used many times can be created as
|
* <p>An HttpField that will be cached and used many times can be created as
|
||||||
* a {@link PreEncodedHttpField}, which will use the {@link HttpFieldPreEncoder}
|
* a {@link PreEncodedHttpField}, which will use the {@link HttpFieldPreEncoder}
|
||||||
* instances discovered by the {@link ServiceLoader} to pre-encode the header
|
* instances discovered by the {@link ServiceLoader} to pre-encode the header
|
||||||
* for each version of HTTP in use. This will save garbage
|
* for each version of HTTP in use. This will save garbage
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HTTP Testing helper class.
|
* An HTTP Testing helper class.
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <pre>
|
* <pre>
|
||||||
|
|
|
@ -170,7 +170,7 @@ public class BufferingFlowControlStrategy extends AbstractFlowControlStrategy
|
||||||
// and here we keep track of its max value.
|
// and here we keep track of its max value.
|
||||||
|
|
||||||
// Updating the max session recv window is done here
|
// Updating the max session recv window is done here
|
||||||
// so that if a peer decides to send an unilateral
|
// so that if a peer decides to send a unilateral
|
||||||
// window update to enlarge the session window,
|
// window update to enlarge the session window,
|
||||||
// without the corresponding data consumption, here
|
// without the corresponding data consumption, here
|
||||||
// we can track it.
|
// we can track it.
|
||||||
|
|
|
@ -40,7 +40,7 @@ public enum ErrorCode
|
||||||
*/
|
*/
|
||||||
INTERNAL_ERROR(2),
|
INTERNAL_ERROR(2),
|
||||||
/**
|
/**
|
||||||
* Indicates a HTTP/2 flow control violation.
|
* Indicates an HTTP/2 flow control violation.
|
||||||
*/
|
*/
|
||||||
FLOW_CONTROL_ERROR(3),
|
FLOW_CONTROL_ERROR(3),
|
||||||
/**
|
/**
|
||||||
|
@ -68,7 +68,7 @@ public enum ErrorCode
|
||||||
*/
|
*/
|
||||||
COMPRESSION_ERROR(9),
|
COMPRESSION_ERROR(9),
|
||||||
/**
|
/**
|
||||||
* Indicates that the connection established by a HTTP CONNECT was abnormally closed.
|
* Indicates that the connection established by an HTTP CONNECT was abnormally closed.
|
||||||
*/
|
*/
|
||||||
HTTP_CONNECT_ERROR(10),
|
HTTP_CONNECT_ERROR(10),
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.eclipse.jetty.util.Callback;
|
||||||
import org.eclipse.jetty.util.Promise;
|
import org.eclipse.jetty.util.Promise;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The SPI interface for implementing a HTTP/2 session.</p>
|
* <p>The SPI interface for implementing an HTTP/2 session.</p>
|
||||||
* <p>This class extends {@link Session} by adding the methods required to
|
* <p>This class extends {@link Session} by adding the methods required to
|
||||||
* implement the HTTP/2 session functionalities.</p>
|
* implement the HTTP/2 session functionalities.</p>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.jetty.http2.frames.Frame;
|
||||||
import org.eclipse.jetty.util.Callback;
|
import org.eclipse.jetty.util.Callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The SPI interface for implementing a HTTP/2 stream.</p>
|
* <p>The SPI interface for implementing an HTTP/2 stream.</p>
|
||||||
* <p>This class extends {@link Stream} by adding the methods required to
|
* <p>This class extends {@link Stream} by adding the methods required to
|
||||||
* implement the HTTP/2 stream functionalities.</p>
|
* implement the HTTP/2 stream functionalities.</p>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.jetty.util.Callback;
|
||||||
import org.eclipse.jetty.util.Promise;
|
import org.eclipse.jetty.util.Promise;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A {@link Session} represents the client-side endpoint of a HTTP/2 connection to a single origin server.</p>
|
* <p>A {@link Session} represents the client-side endpoint of an HTTP/2 connection to a single origin server.</p>
|
||||||
* <p>Once a {@link Session} has been obtained, it can be used to open HTTP/2 streams:</p>
|
* <p>Once a {@link Session} has been obtained, it can be used to open HTTP/2 streams:</p>
|
||||||
* <pre>
|
* <pre>
|
||||||
* Session session = ...;
|
* Session session = ...;
|
||||||
|
@ -127,7 +127,7 @@ public interface Session
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A {@link Listener} is the passive counterpart of a {@link Session} and
|
* <p>A {@link Listener} is the passive counterpart of a {@link Session} and
|
||||||
* receives events happening on a HTTP/2 connection.</p>
|
* receives events happening on an HTTP/2 connection.</p>
|
||||||
*
|
*
|
||||||
* @see Session
|
* @see Session
|
||||||
*/
|
*/
|
||||||
|
@ -151,9 +151,9 @@ public interface Session
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Callback method invoked when a new stream is being created upon
|
* <p>Callback method invoked when a new stream is being created upon
|
||||||
* receiving a HEADERS frame representing a HTTP request.</p>
|
* receiving a HEADERS frame representing an HTTP request.</p>
|
||||||
* <p>Applications should implement this method to process HTTP requests,
|
* <p>Applications should implement this method to process HTTP requests,
|
||||||
* typically providing a HTTP response via
|
* typically providing an HTTP response via
|
||||||
* {@link Stream#headers(HeadersFrame, Callback)}.</p>
|
* {@link Stream#headers(HeadersFrame, Callback)}.</p>
|
||||||
* <p>Applications can detect whether request DATA frames will be arriving
|
* <p>Applications can detect whether request DATA frames will be arriving
|
||||||
* by testing {@link HeadersFrame#isEndStream()}. If the application is
|
* by testing {@link HeadersFrame#isEndStream()}. If the application is
|
||||||
|
|
|
@ -29,8 +29,8 @@ import org.eclipse.jetty.util.Promise;
|
||||||
* <p>A {@link Stream} represents a bidirectional exchange of data on top of a {@link Session}.</p>
|
* <p>A {@link Stream} represents a bidirectional exchange of data on top of a {@link Session}.</p>
|
||||||
* <p>Differently from socket streams, where the input and output streams are permanently associated
|
* <p>Differently from socket streams, where the input and output streams are permanently associated
|
||||||
* with the socket (and hence with the connection that the socket represents), there can be multiple
|
* with the socket (and hence with the connection that the socket represents), there can be multiple
|
||||||
* HTTP/2 streams present concurrent for a HTTP/2 session.</p>
|
* HTTP/2 streams present concurrent for an HTTP/2 session.</p>
|
||||||
* <p>A {@link Stream} maps to a HTTP request/response cycle, and after the request/response cycle is
|
* <p>A {@link Stream} maps to an HTTP request/response cycle, and after the request/response cycle is
|
||||||
* completed, the stream is closed and removed from the session.</p>
|
* completed, the stream is closed and removed from the session.</p>
|
||||||
* <p>Like {@link Session}, {@link Stream} is the active part and by calling its API applications
|
* <p>Like {@link Session}, {@link Stream} is the active part and by calling its API applications
|
||||||
* can generate events on the stream; conversely, {@link Stream.Listener} is the passive part, and
|
* can generate events on the stream; conversely, {@link Stream.Listener} is the passive part, and
|
||||||
|
@ -51,7 +51,7 @@ public interface Stream
|
||||||
Session getSession();
|
Session getSession();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Sends the given HEADERS {@code frame} representing a HTTP response.</p>
|
* <p>Sends the given HEADERS {@code frame} representing an HTTP response.</p>
|
||||||
*
|
*
|
||||||
* @param frame the HEADERS frame to send
|
* @param frame the HEADERS frame to send
|
||||||
* @param callback the callback that gets notified when the frame has been sent
|
* @param callback the callback that gets notified when the frame has been sent
|
||||||
|
@ -131,7 +131,7 @@ public interface Stream
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A {@link Stream.Listener} is the passive counterpart of a {@link Stream} and receives
|
* <p>A {@link Stream.Listener} is the passive counterpart of a {@link Stream} and receives
|
||||||
* events happening on a HTTP/2 stream.</p>
|
* events happening on an HTTP/2 stream.</p>
|
||||||
*
|
*
|
||||||
* @see Stream
|
* @see Stream
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class PrefaceParser
|
||||||
* <p>Advances this parser after the {@link PrefaceFrame#PREFACE_PREAMBLE_BYTES}.</p>
|
* <p>Advances this parser after the {@link PrefaceFrame#PREFACE_PREAMBLE_BYTES}.</p>
|
||||||
* <p>This allows the HTTP/1.1 parser to parse the preamble of the preface,
|
* <p>This allows the HTTP/1.1 parser to parse the preamble of the preface,
|
||||||
* which is a legal HTTP/1.1 request, and this parser will parse the remaining
|
* which is a legal HTTP/1.1 request, and this parser will parse the remaining
|
||||||
* bytes, that are not parseable by a HTTP/1.1 parser.</p>
|
* bytes, that are not parseable by an HTTP/1.1 parser.</p>
|
||||||
*/
|
*/
|
||||||
protected void directUpgrade()
|
protected void directUpgrade()
|
||||||
{
|
{
|
||||||
|
|
|
@ -199,7 +199,7 @@ public class HttpClientTransportOverHTTP2Test extends AbstractTest
|
||||||
.onRequestBegin(request ->
|
.onRequestBegin(request ->
|
||||||
{
|
{
|
||||||
if (request.getVersion() != HttpVersion.HTTP_2)
|
if (request.getVersion() != HttpVersion.HTTP_2)
|
||||||
request.abort(new Exception("Not a HTTP/2 request"));
|
request.abort(new Exception("Not an HTTP/2 request"));
|
||||||
})
|
})
|
||||||
.send();
|
.send();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure a HTTP2 on the ssl connector. --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure an HTTP2 on the ssl connector. --><!-- ============================================================= -->
|
||||||
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
||||||
<Call name="addConnectionFactory">
|
<Call name="addConnectionFactory">
|
||||||
<Arg>
|
<Arg>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure a HTTP2 on the ssl connector. --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure an HTTP2 on the ssl connector. --><!-- ============================================================= -->
|
||||||
<Configure id="httpConnector" class="org.eclipse.jetty.server.ServerConnector">
|
<Configure id="httpConnector" class="org.eclipse.jetty.server.ServerConnector">
|
||||||
<Call name="addConnectionFactory">
|
<Call name="addConnectionFactory">
|
||||||
<Arg>
|
<Arg>
|
||||||
|
|
|
@ -39,8 +39,8 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
* </p>
|
* </p>
|
||||||
* <p>If used in combination with a {@link HttpConnectionFactory} as the
|
* <p>If used in combination with a {@link HttpConnectionFactory} as the
|
||||||
* default protocol, this factory can support the non-standard direct
|
* default protocol, this factory can support the non-standard direct
|
||||||
* update mechanism, where a HTTP1 request of the form "PRI * HTTP/2.0"
|
* update mechanism, where an HTTP1 request of the form "PRI * HTTP/2.0"
|
||||||
* is used to trigger a switch to a HTTP2 connection. This approach
|
* is used to trigger a switch to an HTTP2 connection. This approach
|
||||||
* allows a single port to accept either HTTP/1 or HTTP/2 direct
|
* allows a single port to accept either HTTP/1 or HTTP/2 direct
|
||||||
* connections.
|
* connections.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -64,7 +64,7 @@ import org.eclipse.jetty.util.TypeUtil;
|
||||||
public class HTTP2ServerConnection extends HTTP2Connection implements Connection.UpgradeTo
|
public class HTTP2ServerConnection extends HTTP2Connection implements Connection.UpgradeTo
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param protocol A HTTP2 protocol variant
|
* @param protocol An HTTP2 protocol variant
|
||||||
* @return True if the protocol version is supported
|
* @return True if the protocol version is supported
|
||||||
*/
|
*/
|
||||||
public static boolean isSupportedProtocol(String protocol)
|
public static boolean isSupportedProtocol(String protocol)
|
||||||
|
|
|
@ -188,7 +188,7 @@ public class HTTP2CServerTest extends AbstractServerTest
|
||||||
assertThat(content, containsString("Hello from Jetty using HTTP/1.1"));
|
assertThat(content, containsString("Hello from Jetty using HTTP/1.1"));
|
||||||
assertThat(content, containsString("uri=/one"));
|
assertThat(content, containsString("uri=/one"));
|
||||||
|
|
||||||
// Send a HTTP/2 request.
|
// Send an HTTP/2 request.
|
||||||
headersRef.set(null);
|
headersRef.set(null);
|
||||||
dataRef.set(null);
|
dataRef.set(null);
|
||||||
latchRef.set(new CountDownLatch(2));
|
latchRef.set(new CountDownLatch(2));
|
||||||
|
@ -319,7 +319,7 @@ public class HTTP2CServerTest extends AbstractServerTest
|
||||||
connector.setDefaultProtocol(connectionFactory.getProtocol());
|
connector.setDefaultProtocol(connectionFactory.getProtocol());
|
||||||
connector.start();
|
connector.start();
|
||||||
|
|
||||||
// Now send a HTTP/2 direct request, which
|
// Now send an HTTP/2 direct request, which
|
||||||
// will have the PRI * HTTP/2.0 preface.
|
// will have the PRI * HTTP/2.0 preface.
|
||||||
|
|
||||||
byteBufferPool = new MappedByteBufferPool();
|
byteBufferPool = new MappedByteBufferPool();
|
||||||
|
@ -336,7 +336,7 @@ public class HTTP2CServerTest extends AbstractServerTest
|
||||||
output.write(BufferUtil.toArray(buffer));
|
output.write(BufferUtil.toArray(buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
// We sent a HTTP/2 preface, but the server has no "h2c" connection
|
// We sent an HTTP/2 preface, but the server has no "h2c" connection
|
||||||
// factory so it does not know how to handle this request.
|
// factory so it does not know how to handle this request.
|
||||||
|
|
||||||
InputStream input = client.getInputStream();
|
InputStream input = client.getInputStream();
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure a HTTP2 on the ssl connector. --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure an HTTP2 on the ssl connector. --><!-- ============================================================= -->
|
||||||
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
||||||
<Call name="addConnectionFactory">
|
<Call name="addConnectionFactory">
|
||||||
<Arg>
|
<Arg>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure a HTTP2 on the ssl connector. --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure an HTTP2 on the ssl connector. --><!-- ============================================================= -->
|
||||||
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
||||||
<Call name="addConnectionFactory">
|
<Call name="addConnectionFactory">
|
||||||
<Arg>
|
<Arg>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure a HTTPS connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- and jetty-ssl.xml. --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure an HTTPS connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- and jetty-ssl.xml. --><!-- ============================================================= -->
|
||||||
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
||||||
|
|
||||||
<Call name="addIfAbsentConnectionFactory">
|
<Call name="addIfAbsentConnectionFactory">
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</Call>
|
</Call>
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
<!-- To add a HTTPS SSL listener -->
|
<!-- To add an HTTPS SSL listener -->
|
||||||
<!-- see jetty-ssl.xml to add an ssl connector. use -->
|
<!-- see jetty-ssl.xml to add an ssl connector. use -->
|
||||||
<!-- java -jar start.jar etc/jetty-ssl.xml -->
|
<!-- java -jar start.jar etc/jetty-ssl.xml -->
|
||||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||||
|
|
|
@ -51,7 +51,7 @@ import org.ietf.jgss.Oid;
|
||||||
* of the {@link #getServiceName() service name} and the {@link #getHostName() host name},
|
* of the {@link #getServiceName() service name} and the {@link #getHostName() host name},
|
||||||
* for example {@code HTTP/wonder.com}, using a {@code keyTab} file as the service principal
|
* for example {@code HTTP/wonder.com}, using a {@code keyTab} file as the service principal
|
||||||
* credentials.</p>
|
* credentials.</p>
|
||||||
* <p>Upon receiving a HTTP request, the server tries to authenticate the client
|
* <p>Upon receiving an HTTP request, the server tries to authenticate the client
|
||||||
* calling {@link #login(String, Object, ServletRequest)} where the GSS APIs are used to
|
* calling {@link #login(String, Object, ServletRequest)} where the GSS APIs are used to
|
||||||
* verify client tokens and (perhaps after a few round-trips) a {@code GSSContext} is
|
* verify client tokens and (perhaps after a few round-trips) a {@code GSSContext} is
|
||||||
* established.</p>
|
* established.</p>
|
||||||
|
|
|
@ -806,7 +806,7 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr
|
||||||
{
|
{
|
||||||
//an exact method name
|
//an exact method name
|
||||||
if (!hasOmissions)
|
if (!hasOmissions)
|
||||||
//a http-method does not have http-method-omission to cover the other method names
|
//an http-method does not have http-method-omission to cover the other method names
|
||||||
uncoveredPaths.add(path);
|
uncoveredPaths.add(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
*
|
*
|
||||||
* When a user has been successfully authenticated with some types
|
* When a user has been successfully authenticated with some types
|
||||||
* of Authenticator, the Authenticator stashes a SessionAuthentication
|
* of Authenticator, the Authenticator stashes a SessionAuthentication
|
||||||
* into a HttpSession to remember that the user is authenticated.
|
* into an HttpSession to remember that the user is authenticated.
|
||||||
*/
|
*/
|
||||||
public class SessionAuthentication extends AbstractUserAuthentication
|
public class SessionAuthentication extends AbstractUserAuthentication
|
||||||
implements Serializable, HttpSessionActivationListener, HttpSessionBindingListener
|
implements Serializable, HttpSessionActivationListener, HttpSessionBindingListener
|
||||||
|
|
|
@ -423,7 +423,7 @@ public class ConstraintTest
|
||||||
assertEquals(1, uncoveredPaths.size());
|
assertEquals(1, uncoveredPaths.size());
|
||||||
assertThat("/user/*", is(in(uncoveredPaths)));
|
assertThat("/user/*", is(in(uncoveredPaths)));
|
||||||
|
|
||||||
//Test an explicitly named method with a http-method-omission to cover all other methods
|
//Test an explicitly named method with an http-method-omission to cover all other methods
|
||||||
Constraint constraint2a = new Constraint();
|
Constraint constraint2a = new Constraint();
|
||||||
constraint2a.setAuthenticate(true);
|
constraint2a.setAuthenticate(true);
|
||||||
constraint2a.setName("forbid constraint");
|
constraint2a.setName("forbid constraint");
|
||||||
|
@ -437,7 +437,7 @@ public class ConstraintTest
|
||||||
assertNotNull(uncoveredPaths);
|
assertNotNull(uncoveredPaths);
|
||||||
assertEquals(0, uncoveredPaths.size());
|
assertEquals(0, uncoveredPaths.size());
|
||||||
|
|
||||||
//Test a http-method-omission only
|
//Test an http-method-omission only
|
||||||
Constraint constraint3 = new Constraint();
|
Constraint constraint3 = new Constraint();
|
||||||
constraint3.setAuthenticate(true);
|
constraint3.setAuthenticate(true);
|
||||||
constraint3.setName("omit constraint");
|
constraint3.setName("omit constraint");
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding a HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure the Jetty Server instance with an ID "Server" --><!-- by adding an HTTP connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- ============================================================= -->
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Add a HTTP Connector. -->
|
<!-- Add an HTTP Connector. -->
|
||||||
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
||||||
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
||||||
<!-- instance defined in jetty.xml -->
|
<!-- instance defined in jetty.xml -->
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
|
||||||
|
|
||||||
<!-- ============================================================= --><!-- Configure a HTTPS connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- and jetty-ssl.xml. --><!-- ============================================================= -->
|
<!-- ============================================================= --><!-- Configure an HTTPS connector. --><!-- This configuration must be used in conjunction with jetty.xml --><!-- and jetty-ssl.xml. --><!-- ============================================================= -->
|
||||||
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
|
||||||
|
|
||||||
<Call name="addIfAbsentConnectionFactory">
|
<Call name="addIfAbsentConnectionFactory">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
|
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
|
||||||
|
|
||||||
[description]
|
[description]
|
||||||
Enables a HTTP connector on the server.
|
Enables an HTTP connector on the server.
|
||||||
By default HTTP/1 is support, but HTTP2C can
|
By default HTTP/1 is support, but HTTP2C can
|
||||||
be added to the connector with the http2c module.
|
be added to the connector with the http2c module.
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ import org.eclipse.jetty.util.thread.ThreadPoolBudget;
|
||||||
* {@link ConnectionFactory}s may also create temporary {@link org.eclipse.jetty.io.Connection} instances that will exchange bytes
|
* {@link ConnectionFactory}s may also create temporary {@link org.eclipse.jetty.io.Connection} instances that will exchange bytes
|
||||||
* over the connection to determine what is the next protocol to use. For example the ALPN protocol is an extension
|
* over the connection to determine what is the next protocol to use. For example the ALPN protocol is an extension
|
||||||
* of SSL to allow a protocol to be specified during the SSL handshake. ALPN is used by the HTTP/2 protocol to
|
* of SSL to allow a protocol to be specified during the SSL handshake. ALPN is used by the HTTP/2 protocol to
|
||||||
* negotiate the protocol that the client and server will speak. Thus to accept a HTTP/2 connection, the
|
* negotiate the protocol that the client and server will speak. Thus to accept an HTTP/2 connection, the
|
||||||
* connector will be configured with {@link ConnectionFactory}s for "SSL-ALPN", "h2", "http/1.1"
|
* connector will be configured with {@link ConnectionFactory}s for "SSL-ALPN", "h2", "http/1.1"
|
||||||
* with the default protocol being "SSL-ALPN". Thus a newly accepted connection uses "SSL-ALPN", which specifies a
|
* with the default protocol being "SSL-ALPN". Thus a newly accepted connection uses "SSL-ALPN", which specifies a
|
||||||
* SSLConnectionFactory with "ALPN" as the next protocol. Thus an SSL connection instance is created chained to an ALPN
|
* SSLConnectionFactory with "ALPN" as the next protocol. Thus an SSL connection instance is created chained to an ALPN
|
||||||
|
|
|
@ -35,11 +35,11 @@ import org.eclipse.jetty.io.EndPoint;
|
||||||
* A ConnectionFactory has a protocol name that represents the protocol of the Connections
|
* A ConnectionFactory has a protocol name that represents the protocol of the Connections
|
||||||
* created. Example of protocol names include:
|
* created. Example of protocol names include:
|
||||||
* <dl>
|
* <dl>
|
||||||
* <dt>http</dt><dd>Creates a HTTP connection that can handle multiple versions of HTTP from 0.9 to 1.1</dd>
|
* <dt>http</dt><dd>Creates an HTTP connection that can handle multiple versions of HTTP from 0.9 to 1.1</dd>
|
||||||
* <dt>h2</dt><dd>Creates a HTTP/2 connection that handles the HTTP/2 protocol</dd>
|
* <dt>h2</dt><dd>Creates an HTTP/2 connection that handles the HTTP/2 protocol</dd>
|
||||||
* <dt>SSL-XYZ</dt><dd>Create an SSL connection chained to a connection obtained from a connection factory
|
* <dt>SSL-XYZ</dt><dd>Create an SSL connection chained to a connection obtained from a connection factory
|
||||||
* with a protocol "XYZ".</dd>
|
* with a protocol "XYZ".</dd>
|
||||||
* <dt>SSL-http</dt><dd>Create an SSL connection chained to a HTTP connection (aka https)</dd>
|
* <dt>SSL-http</dt><dd>Create an SSL connection chained to an HTTP connection (aka https)</dd>
|
||||||
* <dt>SSL-ALPN</dt><dd>Create an SSL connection chained to a ALPN connection, that uses a negotiation with
|
* <dt>SSL-ALPN</dt><dd>Create an SSL connection chained to a ALPN connection, that uses a negotiation with
|
||||||
* the client to determine the next protocol.</dd>
|
* the client to determine the next protocol.</dd>
|
||||||
* </dl>
|
* </dl>
|
||||||
|
|
|
@ -61,7 +61,7 @@ import org.eclipse.jetty.util.thread.Scheduler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HttpChannel represents a single endpoint for HTTP semantic processing.
|
* HttpChannel represents a single endpoint for HTTP semantic processing.
|
||||||
* The HttpChannel is both a HttpParser.RequestHandler, where it passively receives events from
|
* The HttpChannel is both an HttpParser.RequestHandler, where it passively receives events from
|
||||||
* an incoming HTTP request, and a Runnable, where it actively takes control of the request/response
|
* an incoming HTTP request, and a Runnable, where it actively takes control of the request/response
|
||||||
* life cycle and calls the application (perhaps suspending and resuming with multiple calls to run).
|
* life cycle and calls the application (perhaps suspending and resuming with multiple calls to run).
|
||||||
* The HttpChannel signals the switch from passive mode to active mode by returning true to one of the
|
* The HttpChannel signals the switch from passive mode to active mode by returning true to one of the
|
||||||
|
@ -1016,7 +1016,7 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor
|
||||||
/**
|
/**
|
||||||
* <p>Listener for {@link HttpChannel} events.</p>
|
* <p>Listener for {@link HttpChannel} events.</p>
|
||||||
* <p>HttpChannel will emit events for the various phases it goes through while
|
* <p>HttpChannel will emit events for the various phases it goes through while
|
||||||
* processing a HTTP request and response.</p>
|
* processing an HTTP request and response.</p>
|
||||||
* <p>Implementations of this interface may listen to those events to track
|
* <p>Implementations of this interface may listen to those events to track
|
||||||
* timing and/or other values such as request URI, etc.</p>
|
* timing and/or other values such as request URI, etc.</p>
|
||||||
* <p>The events parameters, especially the {@link Request} object, may be
|
* <p>The events parameters, especially the {@link Request} object, may be
|
||||||
|
|
|
@ -44,7 +44,7 @@ import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HttpChannel customized to be transported over the HTTP/1 protocol
|
* An HttpChannel customized to be transported over the HTTP/1 protocol
|
||||||
*/
|
*/
|
||||||
public class HttpChannelOverHttp extends HttpChannel implements HttpParser.RequestHandler, HttpParser.ComplianceHandler
|
public class HttpChannelOverHttp extends HttpChannel implements HttpParser.RequestHandler, HttpParser.ComplianceHandler
|
||||||
{
|
{
|
||||||
|
@ -411,7 +411,7 @@ public class HttpChannelOverHttp extends HttpChannel implements HttpParser.Reque
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Attempts to perform a HTTP/1.1 upgrade.</p>
|
* <p>Attempts to perform an HTTP/1.1 upgrade.</p>
|
||||||
* <p>The upgrade looks up a {@link ConnectionFactory.Upgrading} from the connector
|
* <p>The upgrade looks up a {@link ConnectionFactory.Upgrading} from the connector
|
||||||
* matching the protocol specified in the {@code Upgrade} header.</p>
|
* matching the protocol specified in the {@code Upgrade} header.</p>
|
||||||
* <p>The upgrade may succeed, be ignored (which can allow a later handler to implement)
|
* <p>The upgrade may succeed, be ignored (which can allow a later handler to implement)
|
||||||
|
|
|
@ -39,7 +39,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
/**
|
/**
|
||||||
* HTTP Configuration.
|
* HTTP Configuration.
|
||||||
* <p>This class is a holder of HTTP configuration for use by the
|
* <p>This class is a holder of HTTP configuration for use by the
|
||||||
* {@link HttpChannel} class. Typically a HTTPConfiguration instance
|
* {@link HttpChannel} class. Typically an HTTPConfiguration instance
|
||||||
* is instantiated and passed to a {@link ConnectionFactory} that can
|
* is instantiated and passed to a {@link ConnectionFactory} that can
|
||||||
* create HTTP channels (e.g. HTTP, AJP or FCGI).</p>
|
* create HTTP channels (e.g. HTTP, AJP or FCGI).</p>
|
||||||
* <p>The configuration held by this class is not for the wire protocol,
|
* <p>The configuration held by this class is not for the wire protocol,
|
||||||
|
@ -184,19 +184,19 @@ public class HttpConfiguration implements Dumpable
|
||||||
return _outputAggregationSize;
|
return _outputAggregationSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManagedAttribute("The maximum allowed size in bytes for a HTTP request header")
|
@ManagedAttribute("The maximum allowed size in bytes for an HTTP request header")
|
||||||
public int getRequestHeaderSize()
|
public int getRequestHeaderSize()
|
||||||
{
|
{
|
||||||
return _requestHeaderSize;
|
return _requestHeaderSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManagedAttribute("The maximum allowed size in bytes for a HTTP response header")
|
@ManagedAttribute("The maximum allowed size in bytes for an HTTP response header")
|
||||||
public int getResponseHeaderSize()
|
public int getResponseHeaderSize()
|
||||||
{
|
{
|
||||||
return _responseHeaderSize;
|
return _responseHeaderSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManagedAttribute("The maximum allowed size in bytes for a HTTP header field cache")
|
@ManagedAttribute("The maximum allowed size in bytes for an HTTP header field cache")
|
||||||
public int getHeaderCacheSize()
|
public int getHeaderCacheSize()
|
||||||
{
|
{
|
||||||
return _headerCacheSize;
|
return _headerCacheSize;
|
||||||
|
@ -221,20 +221,20 @@ public class HttpConfiguration implements Dumpable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The max idle time is applied to a HTTP request for IO operations and
|
* <p>The max idle time is applied to an HTTP request for IO operations and
|
||||||
* delayed dispatch.</p>
|
* delayed dispatch.</p>
|
||||||
*
|
*
|
||||||
* @return the max idle time in ms or if == 0 implies an infinite timeout, <0
|
* @return the max idle time in ms or if == 0 implies an infinite timeout, <0
|
||||||
* implies no HTTP channel timeout and the connection timeout is used instead.
|
* implies no HTTP channel timeout and the connection timeout is used instead.
|
||||||
*/
|
*/
|
||||||
@ManagedAttribute("The idle timeout in ms for I/O operations during the handling of a HTTP request")
|
@ManagedAttribute("The idle timeout in ms for I/O operations during the handling of an HTTP request")
|
||||||
public long getIdleTimeout()
|
public long getIdleTimeout()
|
||||||
{
|
{
|
||||||
return _idleTimeout;
|
return _idleTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>The max idle time is applied to a HTTP request for IO operations and
|
* <p>The max idle time is applied to an HTTP request for IO operations and
|
||||||
* delayed dispatch.</p>
|
* delayed dispatch.</p>
|
||||||
*
|
*
|
||||||
* @param timeoutMs the max idle time in ms or if == 0 implies an infinite timeout, <0
|
* @param timeoutMs the max idle time in ms or if == 0 implies an infinite timeout, <0
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class OptionalSslConnectionFactory extends AbstractConnectionFactory
|
||||||
int byte2 = buffer.get(1) & 0xFF;
|
int byte2 = buffer.get(1) & 0xFF;
|
||||||
if (byte1 == 'G' && byte2 == 'E')
|
if (byte1 == 'G' && byte2 == 'E')
|
||||||
{
|
{
|
||||||
// Plain text HTTP to a HTTPS port,
|
// Plain text HTTP to an HTTPS port,
|
||||||
// write a minimal response.
|
// write a minimal response.
|
||||||
String body =
|
String body =
|
||||||
"<!DOCTYPE html>\r\n" +
|
"<!DOCTYPE html>\r\n" +
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.jetty.util.resource.Resource;
|
||||||
import org.eclipse.jetty.util.resource.ResourceFactory;
|
import org.eclipse.jetty.util.resource.ResourceFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HttpContent.Factory for transient content (not cached). The HttpContent's created by
|
* An HttpContent.Factory for transient content (not cached). The HttpContent's created by
|
||||||
* this factory are not intended to be cached, so memory limits for individual
|
* this factory are not intended to be cached, so memory limits for individual
|
||||||
* HttpOutput streams are enforced.
|
* HttpOutput streams are enforced.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -410,7 +410,7 @@ public class Response implements HttpServletResponse
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a 102-Processing response.
|
* Sends a 102-Processing response.
|
||||||
* If the connection is a HTTP connection, the version is 1.1 and the
|
* If the connection is an HTTP connection, the version is 1.1 and the
|
||||||
* request has a Expect header starting with 102, then a 102 response is
|
* request has a Expect header starting with 102, then a 102 response is
|
||||||
* sent. This indicates that the request still be processed and real response
|
* sent. This indicates that the request still be processed and real response
|
||||||
* can still be sent. This method is called by sendError if it is passed 102.
|
* can still be sent. This method is called by sendError if it is passed 102.
|
||||||
|
|
|
@ -35,7 +35,7 @@ import javax.servlet.http.Part;
|
||||||
/**
|
/**
|
||||||
* ServletRequestHttpWrapper
|
* ServletRequestHttpWrapper
|
||||||
*
|
*
|
||||||
* Class to tunnel a ServletRequest via a HttpServletRequest
|
* Class to tunnel a ServletRequest via an HttpServletRequest
|
||||||
*/
|
*/
|
||||||
public class ServletRequestHttpWrapper extends ServletRequestWrapper implements HttpServletRequest
|
public class ServletRequestHttpWrapper extends ServletRequestWrapper implements HttpServletRequest
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
/**
|
/**
|
||||||
* ServletResponseHttpWrapper
|
* ServletResponseHttpWrapper
|
||||||
*
|
*
|
||||||
* Wrapper to tunnel a ServletResponse via a HttpServletResponse
|
* Wrapper to tunnel a ServletResponse via an HttpServletResponse
|
||||||
*/
|
*/
|
||||||
public class ServletResponseHttpWrapper extends ServletResponseWrapper implements HttpServletResponse
|
public class ServletResponseHttpWrapper extends ServletResponseWrapper implements HttpServletResponse
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
* Handler for Error pages
|
* Handler for Error pages
|
||||||
* An ErrorHandler is registered with {@link ContextHandler#setErrorHandler(ErrorHandler)} or
|
* An ErrorHandler is registered with {@link ContextHandler#setErrorHandler(ErrorHandler)} or
|
||||||
* {@link Server#setErrorHandler(ErrorHandler)}.
|
* {@link Server#setErrorHandler(ErrorHandler)}.
|
||||||
* It is called by the HttpResponse.sendError method to write a error page via {@link #handle(String, Request, HttpServletRequest, HttpServletResponse)}
|
* It is called by the HttpResponse.sendError method to write an error page via {@link #handle(String, Request, HttpServletRequest, HttpServletResponse)}
|
||||||
* or via {@link #badMessageError(int, String, HttpFields)} for bad requests for which a dispatch cannot be done.
|
* or via {@link #badMessageError(int, String, HttpFields)} for bad requests for which a dispatch cannot be done.
|
||||||
*/
|
*/
|
||||||
public class ErrorHandler extends AbstractHandler
|
public class ErrorHandler extends AbstractHandler
|
||||||
|
@ -467,7 +467,7 @@ public class ErrorHandler extends AbstractHandler
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bad Message Error body
|
* Bad Message Error body
|
||||||
* <p>Generate a error response body to be sent for a bad message.
|
* <p>Generate an error response body to be sent for a bad message.
|
||||||
* In this case there is something wrong with the request, so either
|
* In this case there is something wrong with the request, so either
|
||||||
* a request cannot be built, or it is not safe to build a request.
|
* a request cannot be built, or it is not safe to build a request.
|
||||||
* This method allows for a simple error page body to be returned
|
* This method allows for a simple error page body to be returned
|
||||||
|
|
|
@ -38,7 +38,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
* A handler that shuts the server down on a valid request. Used to do "soft" restarts from Java.
|
* A handler that shuts the server down on a valid request. Used to do "soft" restarts from Java.
|
||||||
* If _exitJvm is set to true a hard System.exit() call is being made.
|
* If _exitJvm is set to true a hard System.exit() call is being made.
|
||||||
* If _sendShutdownAtStart is set to true, starting the server will try to shut down an existing server at the same port.
|
* If _sendShutdownAtStart is set to true, starting the server will try to shut down an existing server at the same port.
|
||||||
* If _sendShutdownAtStart is set to true, make a http call to
|
* If _sendShutdownAtStart is set to true, make an http call to
|
||||||
* "http://localhost:" + port + "/shutdown?token=" + shutdownCookie
|
* "http://localhost:" + port + "/shutdown?token=" + shutdownCookie
|
||||||
* in order to shut down the server.
|
* in order to shut down the server.
|
||||||
*
|
*
|
||||||
|
@ -100,7 +100,7 @@ public class ShutdownHandler extends HandlerWrapper
|
||||||
/**
|
/**
|
||||||
* @param shutdownToken a secret password to avoid unauthorized shutdown attempts
|
* @param shutdownToken a secret password to avoid unauthorized shutdown attempts
|
||||||
* @param exitJVM If true, when the shutdown is executed, the handler class System.exit()
|
* @param exitJVM If true, when the shutdown is executed, the handler class System.exit()
|
||||||
* @param sendShutdownAtStart If true, a shutdown is sent as a HTTP post
|
* @param sendShutdownAtStart If true, a shutdown is sent as an HTTP post
|
||||||
* during startup, which will shutdown any previously running instances of
|
* during startup, which will shutdown any previously running instances of
|
||||||
* this server with an identically configured ShutdownHandler
|
* this server with an identically configured ShutdownHandler
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.jetty.server.HttpInput.Content;
|
||||||
import org.eclipse.jetty.util.component.Destroyable;
|
import org.eclipse.jetty.util.component.Destroyable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HttpInput Interceptor that inflates GZIP encoded request content.
|
* An HttpInput Interceptor that inflates GZIP encoded request content.
|
||||||
*/
|
*/
|
||||||
public class GzipHttpInputInterceptor implements HttpInput.Interceptor, Destroyable
|
public class GzipHttpInputInterceptor implements HttpInput.Interceptor, Destroyable
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,7 @@ import org.eclipse.jetty.util.thread.Locker.Lock;
|
||||||
/**
|
/**
|
||||||
* Session
|
* Session
|
||||||
*
|
*
|
||||||
* A heavy-weight Session object representing a HttpSession. Session objects
|
* A heavy-weight Session object representing an HttpSession. Session objects
|
||||||
* relating to a context are kept in a {@link SessionCache}. The purpose of the
|
* relating to a context are kept in a {@link SessionCache}. The purpose of the
|
||||||
* SessionCache is to keep the working set of Session objects in memory so that
|
* SessionCache is to keep the working set of Session objects in memory so that
|
||||||
* they may be accessed quickly, and facilitate the sharing of a Session object
|
* they may be accessed quickly, and facilitate the sharing of a Session object
|
||||||
|
|
|
@ -555,7 +555,7 @@ public class SessionHandler extends ScopedHandler
|
||||||
/**
|
/**
|
||||||
* @return same as SessionCookieConfig.getSecure(). If true, session
|
* @return same as SessionCookieConfig.getSecure(). If true, session
|
||||||
* cookies are ALWAYS marked as secure. If false, a session cookie is
|
* cookies are ALWAYS marked as secure. If false, a session cookie is
|
||||||
* ONLY marked as secure if _secureRequestOnly == true and it is a HTTPS request.
|
* ONLY marked as secure if _secureRequestOnly == true and it is an HTTPS request.
|
||||||
*/
|
*/
|
||||||
@ManagedAttribute("if true, secure cookie flag is set on session cookies")
|
@ManagedAttribute("if true, secure cookie flag is set on session cookies")
|
||||||
public boolean getSecureCookies()
|
public boolean getSecureCookies()
|
||||||
|
|
|
@ -362,7 +362,7 @@ public class ThreadStarvationTest
|
||||||
byte[] content = new byte[BUFFER_SIZE];
|
byte[] content = new byte[BUFFER_SIZE];
|
||||||
|
|
||||||
{
|
{
|
||||||
// Using a character that will not show up in a HTTP response header
|
// Using a character that will not show up in an HTTP response header
|
||||||
Arrays.fill(content, (byte)'!');
|
Arrays.fill(content, (byte)'!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ public class RequestURITest
|
||||||
// Read the response.
|
// Read the response.
|
||||||
String response = readResponse(client);
|
String response = readResponse(client);
|
||||||
|
|
||||||
// TODO: is HTTP/1.1 response appropriate for a HTTP/1.0 request?
|
// TODO: is HTTP/1.1 response appropriate for an HTTP/1.0 request?
|
||||||
assertThat(response, Matchers.containsString("HTTP/1.1 200 OK"));
|
assertThat(response, Matchers.containsString("HTTP/1.1 200 OK"));
|
||||||
assertThat(response, Matchers.containsString("RequestURI: " + expectedReqUri));
|
assertThat(response, Matchers.containsString("RequestURI: " + expectedReqUri));
|
||||||
assertThat(response, Matchers.containsString("QueryString: " + expectedQuery));
|
assertThat(response, Matchers.containsString("QueryString: " + expectedQuery));
|
||||||
|
|
|
@ -489,7 +489,7 @@ public class DoSFilter implements Filter
|
||||||
/**
|
/**
|
||||||
* Invoked when the request handling exceeds {@link #getMaxRequestMs()}.
|
* Invoked when the request handling exceeds {@link #getMaxRequestMs()}.
|
||||||
* <p>
|
* <p>
|
||||||
* By default, a HTTP 503 response is returned and the handling thread is interrupted.
|
* By default, an HTTP 503 response is returned and the handling thread is interrupted.
|
||||||
*
|
*
|
||||||
* @param request the current request
|
* @param request the current request
|
||||||
* @param response the current response
|
* @param response the current response
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
|
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
|
||||||
|
|
||||||
[description]
|
[description]
|
||||||
Adds a HTTP protocol support to the Unix Domain Socket connector.
|
Adds an HTTP protocol support to the Unix Domain Socket connector.
|
||||||
It should be used when a proxy is forwarding either HTTP or decrypted
|
It should be used when a proxy is forwarding either HTTP or decrypted
|
||||||
HTTPS traffic to the connector and may be used with the
|
HTTPS traffic to the connector and may be used with the
|
||||||
unix-socket-http2c modules to upgrade to HTTP/2.
|
unix-socket-http2c modules to upgrade to HTTP/2.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
|
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
|
||||||
|
|
||||||
[description]
|
[description]
|
||||||
Adds a HTTP2C connetion factory to the Unix Domain Socket Connector
|
Adds an HTTP2C connetion factory to the Unix Domain Socket Connector
|
||||||
It can be used when either the proxy forwards direct
|
It can be used when either the proxy forwards direct
|
||||||
HTTP/2C (unecrypted) or decrypted HTTP/2 traffic.
|
HTTP/2C (unecrypted) or decrypted HTTP/2 traffic.
|
||||||
|
|
||||||
|
|
|
@ -367,7 +367,7 @@ public abstract class Resource implements ResourceFactory, Closeable
|
||||||
/**
|
/**
|
||||||
* URL representing the resource.
|
* URL representing the resource.
|
||||||
*
|
*
|
||||||
* @return an URL representing the given resource
|
* @return a URL representing the given resource
|
||||||
* @deprecated use {{@link #getURI()}.toURL() instead.
|
* @deprecated use {{@link #getURI()}.toURL() instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -151,7 +151,7 @@ public class URLResource extends Resource
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an URL representing the given resource
|
* Returns a URL representing the given resource
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public URL getURL()
|
public URL getURL()
|
||||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Objects;
|
||||||
// @checkstyle-disable-check : AbbreviationAsWordInNameCheck
|
// @checkstyle-disable-check : AbbreviationAsWordInNameCheck
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility methods for converting a {@link URI} between a HTTP(S) and WS(S) URI.
|
* Utility methods for converting a {@link URI} between an HTTP(S) and WS(S) URI.
|
||||||
*/
|
*/
|
||||||
public final class WSURI
|
public final class WSURI
|
||||||
{
|
{
|
||||||
|
|
|
@ -275,7 +275,7 @@ public class WebSocketUpgradeFilter implements Filter, MappedWebSocketCreator, D
|
||||||
// We are in some kind of funky non-http environment.
|
// We are in some kind of funky non-http environment.
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOG.debug("Not a HttpServletRequest, skipping WebSocketUpgradeFilter");
|
LOG.debug("Not an HttpServletRequest, skipping WebSocketUpgradeFilter");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class TooFastClientTest
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test where were a client sends a HTTP Upgrade to websocket AND enough websocket frame(s)
|
* Test where were a client sends an HTTP Upgrade to websocket AND enough websocket frame(s)
|
||||||
* to completely overfill the {@link org.eclipse.jetty.io.AbstractConnection#getInputBufferSize()}
|
* to completely overfill the {@link org.eclipse.jetty.io.AbstractConnection#getInputBufferSize()}
|
||||||
* to test a situation where the WebSocket connection opens with prefill that exceeds
|
* to test a situation where the WebSocket connection opens with prefill that exceeds
|
||||||
* the normal input buffer sizes.
|
* the normal input buffer sizes.
|
||||||
|
|
|
@ -97,7 +97,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
* // Wait for Jetty to be fully started.
|
* // Wait for Jetty to be fully started.
|
||||||
* assertTrue(run1.awaitConsoleLogsFor("Started @", 20, TimeUnit.SECONDS));
|
* assertTrue(run1.awaitConsoleLogsFor("Started @", 20, TimeUnit.SECONDS));
|
||||||
*
|
*
|
||||||
* // Make a HTTP request to the web application.
|
* // Make an HTTP request to the web application.
|
||||||
* HttpClient client = new HttpClient();
|
* HttpClient client = new HttpClient();
|
||||||
* client.start();
|
* client.start();
|
||||||
* ContentResponse response = client.GET("http://localhost:" + port + "/test/index.jsp");
|
* ContentResponse response = client.GET("http://localhost:" + port + "/test/index.jsp");
|
||||||
|
|
Loading…
Reference in New Issue