Protocol::HTTP1
Provides a low-level implementation of the HTTP/1 protocol.
Installation
Add this line to your application's Gemfile:
gem "protocol-http1"
And then execute:
$ bundle
Or install it yourself as:
$ gem install protocol-http1
Usage
Please browse the source code index or refer to the guides below.
Getting Started
This guide explains how to get started with protocol-http1, a low-level implementation of the HTTP/1 protocol for building HTTP clients and servers.
Releases
Please browse the releases for more details.
v0.39.0
- Rename
RequestRefusedError->RefusedError.
v0.38.0
write_requestnow raisesProtocol::HTTP::RequestRefusedErrorif the request line or headers cannot be written, indicating the request was not processed and can be safely retried.
v0.37.1
- Defer
body.closeinwrite_chunked_body,write_fixed_length_body, andwrite_body_and_closeuntil after the response is fully written and flushed. Previously,body.eachcalledclosein itsensureblock before the terminal chunk (chunked encoding) or final flush was written, causingrack.response_finishedcallbacks to delay the client-visible response completion.
v0.37.0
Protocol::HTTP1::BadRequestnow includesProtocol::HTTP::BadRequestfor better interoperability and handling of bad request errors across different HTTP protocol implementations.
v0.36.0
- Indicate trailers from chunked body for better validation by
Protocol::HTTP::Headers.
v0.35.2
- Tidy up implementation of
read_line?to handle line length errors and protocol violations more clearly. - Improve error handling for unexpected connection closures (
Errno::ECONNRESET) inread_line?.
v0.35.0
- Add traces provider for
Protocol::HTTP1::Connection.
v0.34.1
- Fix connection state handling to allow idempotent response body closing.
- Add
kisatenfuzzing integration for improved security testing.
v0.34.0
- Support empty header values in HTTP parsing for better compatibility.
v0.33.0
- Support high-byte characters in HTTP headers for improved international compatibility.
Contributing
We welcome contributions to this project.
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin my-new-feature). - Create new Pull Request.
Developer Certificate of Origin
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
Community Guidelines
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.