diff options
author | Jon Bratseth <bratseth@gmail.com> | 2020-09-14 21:33:41 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2020-09-14 21:33:41 +0200 |
commit | f48d0f17f60ef074e131da38cb032a2af8328e84 (patch) | |
tree | 7d706e4813a80263195ff2e311a8e986dfdc9ae2 /container-core | |
parent | a6a4e2d89afc8f299506ec3c97c9b3613dd26950 (diff) |
Propagate requestType through jdisc core response
Diffstat (limited to 'container-core')
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/jdisc/HttpResponse.java | 6 | ||||
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/HttpResponse.java b/container-core/src/main/java/com/yahoo/container/jdisc/HttpResponse.java index dd03d72d97d..a6042c541c0 100644 --- a/container-core/src/main/java/com/yahoo/container/jdisc/HttpResponse.java +++ b/container-core/src/main/java/com/yahoo/container/jdisc/HttpResponse.java @@ -27,8 +27,6 @@ public abstract class HttpResponse { private final Response parentResponse; - private Request.RequestType requestType; - /** * Creates a new HTTP response * @@ -126,12 +124,12 @@ public abstract class HttpResponse { } /** Sets the type classification of this request for metric collection purposes */ - public void setRequestType(Request.RequestType requestType) { this.requestType = requestType; } + public void setRequestType(Request.RequestType requestType) { parentResponse.setRequestType(requestType); } /** * Returns the type classification of this request for metric collection purposes, or null if not set. * When not set, the request type will be "read" for GET requests and "write" for other request methods. */ - public Request.RequestType getRequestType() { return requestType; } + public Request.RequestType getRequestType() { return parentResponse.getRequestType(); } } diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java b/container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java index ac1aa533201..3a99ee7d0c6 100644 --- a/container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java +++ b/container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java @@ -78,7 +78,6 @@ public abstract class ThreadedHttpRequestHandler extends ThreadedRequestHandler try { channel = new LazyContentChannel(httpRequest, responseHandler, metric, log); HttpResponse httpResponse = handle(httpRequest, channel); - request.setRequestType(httpResponse.getRequestType()); channel.setHttpResponse(httpResponse); // may or may not have already been done render(httpRequest, httpResponse, channel, jdiscRequest.creationTime(TimeUnit.MILLISECONDS)); } catch (Exception e) { |