Skip to content

Commit

Permalink
Issue #4711 trailers
Browse files Browse the repository at this point in the history
Standard trailers cannot be set if committed or HTTP/1.0

Signed-off-by: Greg Wilkins <gregw@webtide.com>
  • Loading branch information
gregw committed Apr 1, 2020
1 parent ec38e99 commit af89596
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1229,7 +1229,10 @@ public Supplier<Map<String, String>> getTrailerFields()
@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);
}

Expand Down

0 comments on commit af89596

Please sign in to comment.