cppalliance / http_proto

HTTP/1 parsing and serialization algorithms using C++11
https://develop.http-proto.cpp.al/
Boost Software License 1.0
23 stars 10 forks source link

copied strings deprecation #71

Closed cmazakas closed 6 months ago

cmazakas commented 6 months ago

Replace copied_strings with a dedicated helper that avoids the need for an extraneous copy. Also add an align_up() helper to be used in a few other places in the codebase eventually.

closes https://github.com/cppalliance/http_proto/issues/59

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.09%. Comparing base (417c8b8) to head (a51b002).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cppalliance/http_proto/pull/71/graphs/tree.svg?width=650&height=150&src=pr&token=IoZbqjUnBr&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance)](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ```diff @@ Coverage Diff @@ ## develop #71 +/- ## =========================================== + Coverage 87.84% 88.09% +0.25% =========================================== Files 77 78 +1 Lines 4302 4260 -42 =========================================== - Hits 3779 3753 -26 + Misses 523 507 -16 ``` | [Files](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) | Coverage Δ | | |---|---|---| | [include/boost/http\_proto/fields\_base.hpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9odHRwX3Byb3RvL2ZpZWxkc19iYXNlLmhwcA==) | `100.00% <ø> (ø)` | | | [include/boost/http\_proto/message\_base.hpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9odHRwX3Byb3RvL21lc3NhZ2VfYmFzZS5ocHA=) | `100.00% <ø> (ø)` | | | [src/detail/align\_up.hpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-c3JjL2RldGFpbC9hbGlnbl91cC5ocHA=) | `100.00% <100.00%> (ø)` | | | [src/detail/header.cpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-c3JjL2RldGFpbC9oZWFkZXIuY3Bw) | `94.00% <100.00%> (-0.02%)` | :arrow_down: | | [src/detail/header.hpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-c3JjL2RldGFpbC9oZWFkZXIuaHBw) | `100.00% <100.00%> (ø)` | | | [src/message\_base.cpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-c3JjL21lc3NhZ2VfYmFzZS5jcHA=) | `77.33% <ø> (-8.02%)` | :arrow_down: | | [src/request.cpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-c3JjL3JlcXVlc3QuY3Bw) | `100.00% <100.00%> (ø)` | | | [src/response.cpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-c3JjL3Jlc3BvbnNlLmNwcA==) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Last update [417c8b8...a51b002](https://app.codecov.io/gh/cppalliance/http_proto/pull/71?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance).
cppalliance-bot commented 6 months ago

GCOVR code coverage report https://71.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://71.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://71.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 6 months ago

GCOVR code coverage report https://71.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://71.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://71.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 6 months ago

GCOVR code coverage report https://71.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://71.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://71.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 6 months ago

GCOVR code coverage report https://71.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://71.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://71.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 6 months ago

GCOVR code coverage report https://71.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://71.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://71.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 6 months ago

GCOVR code coverage report https://71.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://71.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://71.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

vinniefalco commented 6 months ago

This looks good