diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java index e7285ccb7b..38301f898a 100644 --- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java +++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -125,7 +125,7 @@ public OutputStream writeResponseStatusAndHeaders(final long contentLength, fina // the invocation of sendError as on some Servlet implementations // modification of the response headers will have no effect // after the invocation of sendError. - final MultivaluedMap headers = getResponseContext().getStringHeaders(); + final MultivaluedMap headers = responseContext.getStringHeaders(); for (final Map.Entry> e : headers.entrySet()) { final Iterator it = e.getValue().iterator(); if (!it.hasNext()) {