Skip to content

Via Header: Document legacy codes and clarify decoder behavior #12795

@bryancall

Description

@bryancall

Summary

Investigation by Kyle Duren revealed inconsistencies between the Via header documentation, legacy decoder scripts, and current ATS behavior.

Key Findings

1. JavaScript Decoder Coverage ✅

The current JavaScript decoder on trafficserver.apache.org covers all codes that the server currently generates.

2. Legacy Codes (no longer generated by server)

The following codes exist in older decoders but are not generated by current ATS:

Code Position Meaning Source
I Cache Type "icp" Legacy Perl script
L Cache Type "cluster (not used)" Legacy C++ CLI tool

These should either be:

  • Documented as legacy/deprecated, or
  • Removed from decoders if no longer relevant

3. Default Values

The server initializes Via header positions as follows (see proxy/http/HttpTransact.cc lines 827-849):

  • All positions: ' ' (space)
  • ERROR_TYPE: 'N' (no error)

This initialization behavior should be documented.

4. Documentation Sources Inconsistency

There are discrepancies between:

  • Official ATS documentation
  • Legacy Perl decoder script
  • C++ CLI tool (traffic_via)
  • Header files in ATS source

Proposed Actions

  1. Audit Via header codes in source (HttpTransact.cc, HttpTransactHeaders.cc)
  2. Update documentation to reflect current behavior
  3. Mark legacy codes (I, L) as deprecated or remove from decoders
  4. Document default initialization values
  5. Ensure consistency between docs, website decoder, and traffic_via tool

References

/cc @bryancall


Reported by: Kyle Duren

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions