Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 13, 2025

  • Explore repository structure and understand the scope of changes
  • Clean up build artifacts
  • Rename message_base.hpp to header.hpp
  • Rename message_base.cpp to header.cpp
  • Update class definition from message_base to header
  • Update all includes of message_base.hpp to header.hpp
  • Update all references to message_base class in code
  • Update test file message_base.cpp to header.cpp
  • Update documentation references
  • Update the main header boost/http_proto.hpp
  • Rename variable m to h for header parameters
  • Fix documentation inline code references
  • Verify no compilation errors

Summary

This PR completes the terminology refactor requested in the issue by renaming message_base to header throughout the codebase. This clarifies that the class represents the start-line plus fields (the HTTP header), not the full message including body.

Changes Made

Files Renamed

  • include/boost/http_proto/message_base.hppinclude/boost/http_proto/header.hpp
  • src/message_base.cppsrc/header.cpp
  • test/unit/message_base.cpptest/unit/header.cpp

Classes Renamed

  • class message_baseclass header

Variables Renamed

  • All function parameters header const& mheader const& h
  • All function body usages of mh where referring to header
  • All documentation inline code references from `m``h`

Updated Files

  • include/boost/http_proto.hpp - Updated include directive
  • include/boost/http_proto/fields_base.hpp - Updated friend declaration
  • include/boost/http_proto/request_base.hpp - Updated base class and constructor calls
  • include/boost/http_proto/response_base.hpp - Updated base class and constructor calls
  • include/boost/http_proto/serializer.hpp - Updated forward declaration, function signatures, and documentation
  • include/boost/http_proto/impl/serializer.hpp - Updated template function parameters and usages
  • src/serializer.cpp - Updated all references to use new class name and variable name
  • test/unit/metadata.cpp - Updated test lambdas with new type
  • test/unit/request.cpp - Updated include directive
  • doc/modules/ROOT/pages/reference.adoc - Updated documentation reference

Impact

This is a breaking change for any code that directly references the message_base class. Users will need to update their code to use header instead. The change is purely a rename with no functional changes to the API.

Verification

  • No message_base references remain in source code (verified via grep)
  • All include guards updated appropriately
  • All inheritance relationships preserved
  • All function signatures updated consistently
  • All variable names updated from m to h for header parameters
  • All documentation updated including inline code references
Original prompt

This section details on the original issue you should resolve

<issue_title>terminology refactor: header</issue_title>
<issue_description>We use the term "message" to describe the start-line plus fields, and this is confusing because we also use "message" to describe the full request or response including the body. I propose the following, which we should discuss first:

  1. Repurpose the term "header" to mean start-line plus fields
  2. Always say "fields" instead of "headers" (never say "headers")
  3. Use "request header" to mean a request-line plus fields
  4. Use "response header" to mean a status-line plus fields
  5. Rename message_base to header
    </issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #175


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits October 13, 2025 13:54
Co-authored-by: vinniefalco <1503976+vinniefalco@users.noreply.github.com>
Co-authored-by: vinniefalco <1503976+vinniefalco@users.noreply.github.com>
Co-authored-by: vinniefalco <1503976+vinniefalco@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Refactor terminology related to headers and messages Rename message_base to header for terminology clarity Oct 13, 2025
@Copilot Copilot AI requested a review from vinniefalco October 13, 2025 14:10
Copilot finished work on behalf of vinniefalco October 13, 2025 14:10
@vinniefalco vinniefalco requested a review from ashtum October 13, 2025 18:10
serializer::
start(
message_base const& m,
header const& m,
Copy link
Member

Choose a reason for hiding this comment

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

@copilot the variable should be renamed from m to h, and this should happen everywhere that a message_base variable is changed to be a header

Copy link
Author

Choose a reason for hiding this comment

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

Done in commit 6b19f77. Renamed all header const& m parameters to header const& h and updated all usages throughout the serializer code.

Copilot AI and others added 2 commits October 13, 2025 18:26
Co-authored-by: vinniefalco <1503976+vinniefalco@users.noreply.github.com>
Co-authored-by: vinniefalco <1503976+vinniefalco@users.noreply.github.com>
@Copilot Copilot AI requested a review from vinniefalco October 13, 2025 18:31
Copilot finished work on behalf of vinniefalco October 13, 2025 18: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.

terminology refactor: header

2 participants