Search in sources :

Example 6 with HttpRequestInfo

use of com.netflix.zuul.message.http.HttpRequestInfo in project zuul by Netflix.

the class ProxyEndpoint method responseFromOrigin.

public void responseFromOrigin(final HttpResponse originResponse) {
    try (TaskCloseable ignore = PerfMark.traceTask("ProxyEndpoint.responseFromOrigin")) {
        PerfMark.attachTag("uuid", zuulRequest, r -> r.getContext().getUUID());
        PerfMark.attachTag("path", zuulRequest, HttpRequestInfo::getPath);
        methodBinding.bind(() -> processResponseFromOrigin(originResponse));
    } catch (Exception ex) {
        unlinkFromOrigin();
        LOG.error("Error in responseFromOrigin", ex);
        channelCtx.fireExceptionCaught(ex);
    }
}
Also used : HttpRequestInfo(com.netflix.zuul.message.http.HttpRequestInfo) ClientException(com.netflix.client.ClientException) ZuulException(com.netflix.zuul.exception.ZuulException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) OutboundException(com.netflix.zuul.exception.OutboundException) TaskCloseable(io.perfmark.TaskCloseable)

Aggregations

HttpRequestInfo (com.netflix.zuul.message.http.HttpRequestInfo)6 Headers (com.netflix.zuul.message.Headers)2 HttpResponseMessage (com.netflix.zuul.message.http.HttpResponseMessage)2 ClientException (com.netflix.client.ClientException)1 OutboundException (com.netflix.zuul.exception.OutboundException)1 ZuulException (com.netflix.zuul.exception.ZuulException)1 Header (com.netflix.zuul.message.Header)1 HttpRequestMessage (com.netflix.zuul.message.http.HttpRequestMessage)1 DefaultHttpResponse (io.netty.handler.codec.http.DefaultHttpResponse)1 HttpHeaders (io.netty.handler.codec.http.HttpHeaders)1 HttpRequest (io.netty.handler.codec.http.HttpRequest)1 HttpVersion (io.netty.handler.codec.http.HttpVersion)1 TaskCloseable (io.perfmark.TaskCloseable)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 Test (org.junit.Test)1