@Override
            protected HttpObject filter(HttpObject obj) {
                if (obj instanceof ResponseHeaders) {
                    final ResponseHeaders headers = (ResponseHeaders) obj;
                    final String statusText = headers.get(HttpHeaderNames.STATUS);
                    if (statusText == null) {
                        // Missing status header.
                        publisher.close();
                        return obj;
                    }

                    if (ArmeriaHttpUtil.isInformational(statusText)) {
                        // Skip informational headers.
                        return obj;
                    }

                    final HttpStatus status = HttpStatus.valueOf(statusText);
                    if (!status.equals(HttpStatus.OK)) {
                        // Not OK status.
                        publisher.close();
                        return obj;
                    }

                    final String grpcEncoding = headers.get(GrpcHeaderNames.GRPC_ENCODING);
                    if (grpcEncoding != null) {
                        // We use DecompressorRegistry in ArmeriaClientCall. If ArmeriaClientCall
                        // supports to add another decompressor, we will change this to support that too.
                        final Decompressor decompressor =
                                DecompressorRegistry.getDefaultInstance().lookupDecompressor(grpcEncoding);
                        if (decompressor == null) {
                            // Can't find decompressor.
                            publisher.close();
                            return obj;
                        }
                        deframer.decompressor(ForwardingDecompressor.forGrpc(decompressor));
                    }
                    return obj;
                }

                if (obj instanceof HttpData && !publisher.isComplete()) {
                    final HttpData httpData = (HttpData) obj;
                    final HttpData wrapped = HttpData.wrap(
                            httpData.byteBuf(ByteBufAccessMode.RETAINED_DUPLICATE));
                    final boolean ignored = publisher.tryWrite(wrapped);
                }
                return obj;
            }
Utilities for working with <a href="https://grpc.io/docs/languages/web/basics/">gRPC-Web</a>.

<p>Note that this class will be removed once a retry {@link ClientInterceptor} is added.
See: https://github.com/line/armeria/issues/2860
grpc/src/main/java/com/linecorp/armeria/internal/client/grpc/GrpcWebTrailersExtractor.java