Skip to content
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

HTTP API refactoring #2075

Merged
merged 1 commit into from
Jan 10, 2025
Merged

HTTP API refactoring #2075

merged 1 commit into from
Jan 10, 2025

Conversation

gdamore
Copy link
Contributor

@gdamore gdamore commented Jan 7, 2025

This is a work in progress -- refactoring the HTTP API entirely.

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 84.86172% with 104 lines in your changes missing coverage. Please review.

Project coverage is 83.47%. Comparing base (a381af4) to head (73f50e2).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/supplemental/http/http_conn.c 83.79% 59 Missing ⚠️
src/supplemental/http/http_server.c 77.61% 15 Missing ⚠️
src/supplemental/http/http_public.c 76.00% 12 Missing ⚠️
src/supplemental/http/http_msg.c 89.10% 11 Missing ⚠️
src/supplemental/websocket/websocket.c 91.42% 6 Missing ⚠️
src/supplemental/http/http_client.c 97.14% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2075      +/-   ##
==========================================
+ Coverage   82.92%   83.47%   +0.55%     
==========================================
  Files          94       94              
  Lines       23694    23600      -94     
  Branches     3052     3056       +4     
==========================================
+ Hits        19648    19701      +53     
+ Misses       3970     3821     -149     
- Partials       76       78       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/supplemental/http/http_conn.c Dismissed Show dismissed Hide dismissed
This represents a major change in the HTTP code base, consisting
of a complete revamp of the HTTP API. The changes here are too
numerous to mention, but the end result should be a vastly
simpler API for both server and client applications.

Many needless allocations were removed by providing fixed buffers
for various parameters and headers when possible.

A few bugs were fixed. Most especially we have fixed some bugs
around very large URIs and headers, and we have also addressed
conformance bugs to more closely conform to RFCs 9110 and 9112.

As part of this work, the APIs for WebSockets changed slightly
as well.  In particular the properties available for accessing
headers have changed.

There is still documentation conversion work to do, and additional
functionality (such as proper support for chunked transfers), but
this is a big step in the right direction.
@gdamore gdamore merged commit 73f50e2 into main Jan 10, 2025
37 checks passed
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.

1 participant