servicetalk-http-api/src/main/java/io/servicetalk/http/api/DefaultHttpStreamingSerializer.java [67:99]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public HttpPayloadWriter<T> serialize(final HttpHeaders headers, final HttpPayloadWriter<Buffer> payloadWriter,
                                          final BufferAllocator allocator) {
        // Do the headers modification eagerly, otherwise if this is done lazily the headers would have already been
        // written and the modification will not be applied in time.
        headersSerializeConsumer.accept(headers);
        PayloadWriter<T> result = serializer.serialize(payloadWriter, allocator);
        return new HttpPayloadWriter<T>() {
            @Override
            public HttpHeaders trailers() {
                return payloadWriter.trailers();
            }

            @Override
            public void write(final T t) throws IOException {
                result.write(t);
            }

            @Override
            public void close(final Throwable cause) throws IOException {
                result.close(cause);
            }

            @Override
            public void close() throws IOException {
                result.close();
            }

            @Override
            public void flush() throws IOException {
                result.flush();
            }
        };
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



servicetalk-http-api/src/main/java/io/servicetalk/http/api/DefaultHttpStreamingSerializerDeserializer.java [64:96]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public HttpPayloadWriter<T> serialize(final HttpHeaders headers, final HttpPayloadWriter<Buffer> payloadWriter,
                                          final BufferAllocator allocator) {
        // Do the headers modification eagerly, otherwise if this is done lazily the headers would have already been
        // written and the modification will not be applied in time.
        headersSerializeConsumer.accept(headers);
        PayloadWriter<T> result = serializer.serialize(payloadWriter, allocator);
        return new HttpPayloadWriter<T>() {
            @Override
            public HttpHeaders trailers() {
                return payloadWriter.trailers();
            }

            @Override
            public void write(final T t) throws IOException {
                result.write(t);
            }

            @Override
            public void close(final Throwable cause) throws IOException {
                result.close(cause);
            }

            @Override
            public void close() throws IOException {
                result.close();
            }

            @Override
            public void flush() throws IOException {
                result.flush();
            }
        };
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



