Skip to content

Conversation

@zjmarlow
Copy link

@zjmarlow zjmarlow commented Jan 9, 2026

draft pull request with minimal changes to handle eol. also updates is-chunked check to include the case where multiple Transfer Encodings are present (chunked should always be last).

requesting feedback before final changes.

@lizmat
Copy link
Collaborator

lizmat commented Jan 12, 2026

Appears to be failing 2 tests for me on MacOS:

=== t/020-message.rakutest
1..21
ok 1 - new 1/4
ok 2 - new 2/4
ok 3 - new 3/4
ok 4 - new 4/4
ok 5 - push-field 1/2
ok 6 - push-field 2/2
ok 7 - add-content 1/2
ok 8 - add-content 2/2
ok 9 - remove-field 1/1
ok 10 - parse 1/4
ok 11 - parse 2/4
ok 12 - parse 3/4
ok 13 - parse 4/4
not ok 14 - Str 1/2
# Failed test 'Str 1/2'
# at t/020-message.rakutest line 41
# expected: 'a: b, c, d
# 
# line
# '
#      got: 'a: b, c, d
# Content-Length: 4
# 
# line'
not ok 15 - Str 2/2
# Failed test 'Str 2/2'
# at t/020-message.rakutest line 42
# expected: 'a: b, c, d

line
'
#      got: 'a: b, c, d
Content-Length: 4

line'
ok 16 - clear 1/2
ok 17 - clear 2/2
ok 18 - parse complex 1/3
ok 19 - parse complex 2/3
ok 20 - parse complex 3/3
# Subtest: charset
    ok 1 - dumb default charset
    ok 2 - default text charset
    ok 3 - default "non-text" charset
    ok 4 - explicity charset
    1..4
ok 21 - charset
# You failed 2 tests of 21

@zjmarlow
Copy link
Author

Should HTTP::UserAgent be producing valid Messages, or is it up to the users of the library to use it in such a way that it only produces valid messages? Some of the test messages are themselves invalid, so what needs changing will depend on the library's purpose.

@lizmat
Copy link
Collaborator

lizmat commented Jan 16, 2026

Well, that is a good question. What this module really needs, is a maintainer.

Would you be willing to take on that role? You apparently have a need to fix things in it :-)

@zjmarlow
Copy link
Author

Yes, but I'll need guidance and feedback as I maintain it, if that's okay?

Some first questions:

  • should the module or the module users be responsible for making sure messages generated are valid, and
  • what should be done when an invalid message is received:
    • nothing / ignore
    • parse as much as possible and silently ignore the rest
    • warning
    • exception
    • optional error handler callback that takes the message as an argument
    • other?

I'll start looking through the other open issues, too.

@zjmarlow
Copy link
Author

What would the best channel / medium be for discussing this module?

@lizmat
Copy link
Collaborator

lizmat commented Jan 19, 2026

Either #raku on libera.chat or on Discord

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