Skip to content

[BUG] Test coverage for -DCASE_INSENSITIVE is lacking. #310

Open

Description

@bcsgh

Prerequisites

Description

Some digging around for other reason shows that http_endpoint::operator< is unconditionally case-insensitive. This strongly implies that there are gaps in the test suite relating to builds with -DCASE_INSENSITIVE.

Steps to Reproduce

Play around with this: 518a966

Expected behavior: Test coverage both with and withou -DCASE_INSENSITIVE and the cases where they differ.

Actual behavior: A test I added for one case surfaced a bug.

Versions

Current master.

Activity

  1. added
    bugConfirmed bugs or reports that are very likely to be bugs.
    on Apr 6, 2023
  2. added a commit that references this issue on Oct 27, 2023
  3. etr commented on Jul 23, 2026

    @etr
    Owner

    Update for libhttpserver 2.0 — partially addressed, but leaving this open.

    The dispatch-time impact is gone: v2's 3-tier route table is now the sole routing oracle and is consistently case-sensitive by default. It replaces the v1 registered_resources ordered map whose key comparator (http_endpoint::operator<) was the unconditionally case-insensitive one you flagged. test/integ/basic.cpp also gained #ifdef CASE_INSENSITIVE routing probes.

    However, the underlying gap this issue is about remains:

    • There's still no --enable-case-insensitive configure option and no CI lane that builds with -DCASE_INSENSITIVE, so those probes are never compiled or exercised.
    • http_endpoint::operator< is still unconditionally case-insensitive via std::toupper (now vestigial, but unchanged).

    Leaving this open to track adding a real -DCASE_INSENSITIVE build + test lane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugConfirmed bugs or reports that are very likely to be bugs.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions