mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
b9348bb89c
Prior to this commit, the `ProtobufHttpMessageConverter` would call `outputMessage.getBody()` at the beginning of the `writeInternal` method, thus writing HTTP headers. Since this method is trying to write "x-protobuf" headers after that, protobuf support wasn't working properly for the default "x-protobuf" media type. Thanks Toshiaki Maki for the repro project! Also fixed: * improve `MockHttpOutputMessage` behavior to reproduce the read-only state of HTTP headers once they've been written. Issue: SPR-12229