netty5/codec-http/src
Nitesh Kant 5a658bb887
HttpUtil#normalizeAndGetContentLength() should handle empty value (#11409)
__Motivation__

`HttpUtil#normalizeAndGetContentLength()` throws `StringIndexOutOfBoundsException` for empty `content-length` values, it should instead throw `IllegalArgumentException` for all invalid values.

__Modification__

- Throw `IllegalArgumentException` if the `content-length` value is empty.
- Add tests

__Result__

Fixes https://github.com/netty/netty/issues/11408
2021-06-23 12:07:16 +02:00
..
main HttpUtil#normalizeAndGetContentLength() should handle empty value (#11409) 2021-06-23 12:07:16 +02:00
test HttpUtil#normalizeAndGetContentLength() should handle empty value (#11409) 2021-06-23 12:07:16 +02:00