arturobernalg commented on code in PR #770:
URL:
https://github.com/apache/httpcomponents-client/pull/770#discussion_r2620265164
##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ContentCompressionExec.java:
##########
@@ -158,6 +175,9 @@ public ClassicHttpResponse execute(
if (contentEncoding != null) {
final ParserCursor cursor = new ParserCursor(0,
contentEncoding.length());
final HeaderElement[] codecs =
BasicHeaderValueParser.INSTANCE.parseElements(contentEncoding, cursor);
+ if (maxCodecListLen > 0 && codecs.length > maxCodecListLen) {
+ throw new ProtocolException("Codec list exceeds maxumum of
" + maxCodecListLen + " elements");
Review Comment:
- “maxumum” → maximum
- Should we validate maxCodecListLen and reject negative values with an
`IllegalArgumentException`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]