Skip to content

Unable to match on HTTP pseudo headers that start with : (colon) #2455

Closed as not planned
@arkodg

Description

@arkodg

What happened:

tried to match on a http pseudo header in my HTTPRoute

- matches:
    - headers:
      - name: ":scheme"
        value: "http"

Got this error

the Kubernetes API server reported that "envoy-gateway-system/httpbin-test-http-3b88a86a" failed to fully initialize or become live: HTTPRoute.gateway.networking.k8s.io "httpbin-test-http-3b88a86a" is invalid: spec.rules[0].matches[0].headers[0].name: Invalid value: ":scheme": spec.rules[0].matches[0].headers[0].name in body should match '^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$'

What you expected to happen:

The HTTPRoute would get accepted and I would be able to add a redirect filter which redirects to https only when
the current request is http, else you end up also getting a redirect for https

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Pseudo headers defined in https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions