apache / apache/trafficserver

TS_ALPN_PROTOCOL_ symbols are defined in the wrong place

Open
#10,975 1 comment 0 reactions 1 assignee Claimed by @JosiahWI View on GitHub
Bug Build Records Stale TS API
Dominant language
C++
Stars
2k
Forks
874
Avg merge
6d 15h
Merged PRs (30d)
46

Description

A bunch of HTTP/HTTPS protocol constants that are supposed to be part of the public TS API are declared in `ts/apidefs.h.in` and defined in `records/RecHttp.cc`. We do not link plugins against the records library, so these symbols may not be visible to the linker as they should be. This is a bug and it just happens to work in `master`. That's fragile; the evidence is the OSX build breaking on #10967 because of simple CMake changes that should have been safe.

Simply moving the definitions from `records` to `api` is not enough by itself, because `RecHttp.h` depends on a subset of those symbols, particularly the `TS_ALPN_PROTOCOL_INDEX_` ones. I've played around with defining one set of constants in `RecHttp.h` and making the `TS_ALPN_PROTOCOL_INDEX` variables references to that first set of constants. This works fine, but declaring those variables as references might break API compatibility, so it might not be a usable solution.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.