Issue #4711 trailers
Standard trailers cannot be set if committed or HTTP/1.0 Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
ec38e99630
commit
af895966fa
|
@ -1229,7 +1229,10 @@ public class Response implements HttpServletResponse
|
|||
@Override
|
||||
public void setTrailerFields(Supplier<Map<String, String>> trailers)
|
||||
{
|
||||
// TODO new for 4.0 - avoid transient supplier?
|
||||
if (isCommitted())
|
||||
throw new IllegalStateException("Committed");
|
||||
if (getHttpChannel().getRequest().getHttpVersion().ordinal() <= HttpVersion.HTTP_1_0.ordinal())
|
||||
throw new IllegalStateException("Trailers not supported");
|
||||
this._trailers = new HttpFieldsSupplier(trailers);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue