Skip to content

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Jan 2, 2026

Signed-off-by: Juan Cruz Viotti [email protected]

@jviotti jviotti force-pushed the response-class branch 10 times, most recently from 30a9a18 to c0fec64 Compare January 5, 2026 14:05
@jviotti jviotti changed the title [WIP] Implement an HTTPResponse helper class Implement an HTTPResponse helper class Jan 5, 2026
@jviotti jviotti marked this pull request as ready for review January 5, 2026 14:10
@augmentcode
Copy link

augmentcode bot commented Jan 5, 2026

🤖 Augment PR Summary

Summary: This PR introduces an HTTPResponse wrapper and refactors the server request/response flow to centralize response sending and static file serving.

Changes:

  • Added HTTPResponse in src/server/response.h, and moved HTTP status string constants there (formerly status.h).
  • Refactored server routing code by extracting endpoint logic into new action headers (action_jsonschema_evaluate.h, action_jsonschema_serve.h, action_schema_search.h).
  • Introduced action_serve_metapack_file.h to replace the previous serve_static_file helper and unify caching/ETag behavior.
  • Extended HTTPRequest to hold the underlying response pointer and added an async body() helper that snapshots method/path for callbacks.
  • Updated server.cc to use the new HTTPRequest/HTTPResponse API and adjusted handler indices in sourcemeta/one/shared.h.
  • Updated src/server/CMakeLists.txt to include the new/renamed headers.

Technical Notes: Response sending now routes through HTTPResponse::send() to apply content-encoding (gzip/identity) consistently, and static metapack responses share conditional request handling (If-Modified-Since / If-None-Match) via action_serve_metapack_file.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@jviotti jviotti merged commit 2a26416 into main Jan 5, 2026
4 checks passed
@jviotti jviotti deleted the response-class branch January 5, 2026 14:31
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