use of org.eclipse.jetty.http2.ErrorCode in project jetty.project by eclipse.
the class HttpReceiverOverHTTP2 method onReset.
@Override
public void onReset(Stream stream, ResetFrame frame) {
HttpExchange exchange = getHttpExchange();
if (exchange == null)
return;
ErrorCode error = ErrorCode.from(frame.getError());
String reason = error == null ? "reset" : error.name().toLowerCase(Locale.ENGLISH);
exchange.getRequest().abort(new IOException(reason));
}
use of org.eclipse.jetty.http2.ErrorCode in project jetty.project by eclipse.
the class ResetFrame method toString.
@Override
public String toString() {
ErrorCode errorCode = ErrorCode.from(error);
String reason = errorCode == null ? "error=" + error : errorCode.name().toLowerCase(Locale.ENGLISH);
return String.format("%s#%d{%s}", super.toString(), streamId, reason);
}
Aggregations