Browse Source
Prior to this commit, the `AbstractMessageConverterMethodProcessor` would fail to convert `InputStreamResource` to `ResourceRegion` as expected, since the content length cannot be read without consuming the stream. This is enforced by the `HttpRange` class. Now the method processor would still try to output HTTP range response headers to provide range support information. This step is using the resource content length and reads the input stream, leading to exceptions such as "IllegalStateException: InputStream has already been read". This commit improves the return type detection and excludes early `InputStreamResource` return types. With those types, HTTP range support is now completely disabled. Issue: SPR-16754pull/1804/head
2 changed files with 24 additions and 1 deletions
Loading…
Reference in new issue