Skip to content

Establish a set of canonical "hard" event encodings for testing. #381

@evankanderson

Description

@evankanderson

Related to #367, there are also a number of cases where the expected parsing is not spelled out today. I volunteer the following HTTP binary mode object for consideration:

POST / HTTP/1.1
Content-Type: text/xml
CE-Extension: foo
CE-Extension-Key1: bar
CE-Extension-Key2: baz
CE-SpecVersion: 0.2
CE-Cloudeventsversion: v0.1
CE-Source: https://jackboxgames.com/project/you-dont-know-jack-party/
CE-Type: u(dont-know-jack)
CE-ID: ""😊
Content-Length: 19

<much wow=\"xml\"/>

I believe this should correspond to a JSON object like the following:

{
  "specversion": "0.2",
  "source": "https://jackboxgames.com/project/you-dont-know-jack-party/",
  "type": "u(dont-know-jack)",
  "id": "\"\"😊",
  "extension": "foo",
  "cloudeventsversion": "v0.1",
  "contenttype": "text/xml",
  "data": "<much wow=\\\"xml\\\"/>"
}

Note that the extension map keys were silently dropped; a different definition would be to discard the value "foo". Additionally, the actual "data" content is actually invalid XML, if I recall my XML correctly.

Metadata

Metadata

Assignees

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