Stream: git-wasmtime

Topic: wasmtime / PR #14702 wasi-http: report a full field map a...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:14):

xia-chao opened PR #14702 from xia-chao:fix/wasi-http-field-map-capacity-error to bytecodealliance:main:

A full HeaderMap made Fields::set/delete report invalid-syntax for valid names. http's try_entry was treating MaxSizeReached as InvalidHeaderName. This PR switches to try_insert/try_append.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:14):

xia-chao requested rvolosatovs for a review on PR #14702.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:14):

xia-chao requested wasmtime-wasi-reviewers for a review on PR #14702.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:28):

:repeat: rvolosatovs submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:28):

:speech_balloon: rvolosatovs created PR review comment:

try_append could fail here, which could leave the map in inconsistent state and incorrectly report size

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:28):

:speech_balloon: rvolosatovs created PR review comment:

could we make this smaller?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:28):

:speech_balloon: rvolosatovs created PR review comment:

this seems to be testing implementation details of http crate, instead, let's assert the actual results we expect (e.g. error with TooManyFields)

I'd suggest breaking each statement line-by-line and asserting result of each operation individually without using an array

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:28):

:speech_balloon: rvolosatovs created PR review comment:

The key was already parsed here, so could we keep using the entry API if we did something like:

map.try_entry(key).map_err(|_| FieldMapError::TooManyFields)?

https://github.com/hyperium/http/blob/3dd9f5e1c3c228c26e6836ee60b36129351bfd3b/src/header/map.rs#L1260-L1273

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:31):

:memo: rvolosatovs submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:31):

:speech_balloon: rvolosatovs created PR review comment:

        // `try_entry` misreports a full map as `InvalidHeaderName`.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:32):

:speech_balloon: rvolosatovs deleted PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:32):

:speech_balloon: rvolosatovs edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:46):

xia-chao updated PR #14702.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:53):

xia-chao commented on PR #14702:

Done! Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 19:10):

:thumbs_up: rvolosatovs submitted PR review:

Thanks!

There's still a little issue with set setting keys that already exist, but this is already an improvement and it fixes an existing issue, so I'm going to merge this.

Would you like to work on a follow-up for set specifically?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 19:10):

:speech_balloon: rvolosatovs created PR review comment:

this actually looks wrong, because set should have replaced the values

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 19:10):

:speech_balloon: rvolosatovs created PR review comment:

Unfortunately, this would still prevent set for a key, which already exists when the map is full, even though the values should have been replaced.

Perhaps we could work around that by first removing the key?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 19:11):

rvolosatovs added PR #14702 wasi-http: report a full field map as size-exceeded to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 19:35):

rvolosatovs removed PR #14702 wasi-http: report a full field map as size-exceeded from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 19:35):

:check: rvolosatovs merged PR #14702.


Last updated: Oct 31 2026 at 23:03 UTC