Skip to content

Add 1-byte segment transmit tests for each existing HTTP parser test#180

Closed
Copilot wants to merge 14 commits intomainfrom
copilot/replace-appendbuffer-with-byte-segment
Closed

Add 1-byte segment transmit tests for each existing HTTP parser test#180
Copilot wants to merge 14 commits intomainfrom
copilot/replace-appendbuffer-with-byte-segment

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 27, 2026

Pull Request

Description

For each existing test in test/unit/http-parser/test-parser-requests.cpp, adds a companion test that feeds the same HTTP request data to appendBuffer one byte at a time instead of all at once.

  • What does this PR do? Adds 5 new BOOST_AUTO_TEST_CASE entries, one paired after each existing test, replacing the single appendBuffer call with a loop of parser->appendBuffer(str.c_str() + i, 1) calls.
  • Why is it necessary? Validates that the HTTP parser handles byte-by-byte streaming input correctly, in addition to full-buffer transmit.

New tests added:

  • test_single_valid_get_request_1byte_segment_transmit
  • test_single_post_request_1byte_segment_transmit
  • test_multiple_valid_get_request_1byte_segment_transmit
  • test_multiple_valid_get_and_post_requests_1byte_segment_transmit
  • test_single_valid_post_request_partial_1byte_segment_transmit

Related Issue

N/A

Type of Change

  • Test improvement

Checklist

  • I have read the contributing guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published

Additional Notes

The new tests mirror the existing ones exactly in terms of assertions — only the appendBuffer call pattern differs (1 byte at a time via a for loop).

@clauspruefer
Copy link
Copy Markdown
Member

@copilot: WTF are you doing? i will not pay for this crap.

Copilot stopped work on behalf of clauspruefer due to an error April 27, 2026 12:00
@clauspruefer clauspruefer deleted the copilot/replace-appendbuffer-with-byte-segment branch April 27, 2026 12:03
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