Package org.apache.pekko.http
Class IllegalRequestContext
java.lang.Object
org.apache.pekko.http.IllegalRequestContext
What is known about a request that failed to parse, at the point where parsing gave up.
Every field is optional because a request can be rejected before that part of it has been read: a request with an unsupported method fails before the request target is seen, and one with an unparsable request target fails before the protocol is seen.
Note that rawRequestTarget is unvalidated, attacker-controlled input, by definition malformed
whenever the rejection was caused by the request target itself. Anything that logs or echoes it
has to escape it.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionIllegalRequestContext(scala.Option<HttpMethod> method, scala.Option<String> rawRequestTarget, scala.Option<HttpProtocol> protocol) -
Method Summary
Modifier and TypeMethodDescriptionstatic IllegalRequestContextapply(scala.Option<HttpMethod> method, scala.Option<String> rawRequestTarget, scala.Option<HttpProtocol> protocol) static IllegalRequestContextempty()A context that knows nothing about the request, used when no information could be recovered.Java APIJava APIJava APIscala.Option<HttpMethod>method()scala.Option<HttpProtocol>protocol()scala.Option<String>toString()
-
Constructor Details
-
IllegalRequestContext
public IllegalRequestContext(scala.Option<HttpMethod> method, scala.Option<String> rawRequestTarget, scala.Option<HttpProtocol> protocol)
-
-
Method Details
-
empty
A context that knows nothing about the request, used when no information could be recovered.- Returns:
- (undocumented)
- Since:
- 2.0.0
-
apply
public static IllegalRequestContext apply(scala.Option<HttpMethod> method, scala.Option<String> rawRequestTarget, scala.Option<HttpProtocol> protocol) -
method
-
rawRequestTarget
-
protocol
-
getMethod
Java API- Returns:
- (undocumented)
- Since:
- 2.0.0
-
getRawRequestTarget
Java API- Returns:
- (undocumented)
- Since:
- 2.0.0
-
getProtocol
Java API- Returns:
- (undocumented)
- Since:
- 2.0.0
-
toString
-