Thanks to visit codestin.com
Credit goes to github.com

Skip to content

HttpRequest.getFirstHeader("foo") performs case-sensitive header look ups #89

@alexbrand

Description

@alexbrand

We were digging into Cloud Functions and OpenTelemetry and ran into an issue with getting the traceparent header to ensure tracing context is propagated. We noticed that the problem was that Cloud Functions sets the header name to Traceparent, but OpenTelemetry looks for a header named traceparent.

Ideally, this should not matter, given that headers should be treated without case sensitivity, per RFC 7320 Section 3.2. However, com.google.cloud.functions.HttpRequest.getFirstHeader seems to care about casing.

Would it make sense to change the implementation to treat headers without case sensitivity? At the moment, we are planning to use a workaround (See gist for an example)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions