Skip to content

Core HTTP decoder doesn't unescape quoted header values #332

Backlog

Description

@EmiRZx

Expected Behavior

binary mode header values are unescaped with respect to double-quoted strings before percent-decoding, as HTTP binding 3.1.3.2 requires. sdk-go does this in cloudevents/sdk-go#1356.

Actual Behavior

cloudevents.core.bindings.http._decode_header_value only runs unquote, so quotes and backslash escapes stay in the value and a quoted ce-specversion fails validation.

Steps to Reproduce the Problem

  1. build an HTTPMessage with the required ce- headers and ce-subject: "say \"hi\""
  2. call cloudevents.core.bindings.http.from_binary(message, JSONFormat())
  3. the subject is "say \"hi\"" instead of say "hi", and with ce-specversion: "1.0" it raises CloudEventValidationError

Specifications

  • Platform: any
  • Python Version: 3.14

fix in #333.

Activity

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

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