-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow header values to be arrays (Rack 3) #2936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
test/test_response_header.rb
Outdated
|
|
||
| def send_http_and_read(req) | ||
| send_http(req).read | ||
| send_http(req).sysread 10_240 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read is evil. I was working on this, and with read, the new test took 20 sec. With sysread, it was what it should be.
But, then the Windows tests (only Ruby 3.1 and later), weren't getting the full response. But, using PR #2896, no problem.
Some of the issue is using the same Process for the server and client...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see 👍 Lets refactor the magic number into a constant somwhere then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Added comment also, as the value is dependent on the tests. I've used looping code for responses with unknown length...
nateberkopec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left some thoughts.
63dc9ec to
955cc92
Compare
955cc92 to
97ed909
Compare
* request.rb - allow header array value * test_response_header.rb - add test
Description
Closes #2931
Your checklist for this pull request
[ci skip]to the title of the PR.#issue" to the PR description or my commit messages.