Skip to content

Fix HTTP/2 stream priority memory leak by dropping unused PriorityValue cache from AbstractH2StreamMultiplexer.#617

Open
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:leak_priority
Open

Fix HTTP/2 stream priority memory leak by dropping unused PriorityValue cache from AbstractH2StreamMultiplexer.#617
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:leak_priority

Conversation

@arturobernalg
Copy link
Member

No description provided.

@arturobernalg arturobernalg requested a review from ok2c February 14, 2026 17:00
if (HttpHeaders.PRIORITY.equalsIgnoreCase(h.getName())) {
final PriorityValue pv = PriorityParamsParser.parse(h.getValue()).toValueWithDefaults();
priorities.put(streamId, pv);
final PriorityValue pv = parsePriorityValue(h.getValue());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arturobernalg Use more efficient #parse method that takes Header as a parameter.

private PriorityValue parsePriorityValue(final String field) {
try {
return PriorityParamsParser.parse(field).toValueWithDefaults();
} catch (final RuntimeException ignore) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arturobernalg Why is that? Why ignoring all runtime exceptions here indiscriminately? What specific exception do you think should be ignored here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ok2c Fair enough. now only ignore IllegalArgumentException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants