Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers order and using same header multiple times #356

Open
honzajavorek opened this issue Jan 25, 2016 · 2 comments
Open

Headers order and using same header multiple times #356

honzajavorek opened this issue Jan 25, 2016 · 2 comments

Comments

@honzajavorek
Copy link
Contributor

According to documentation at https://github.com/apiaryio/blueprint-transactions, transaction objects contain HTTP headers for both requests and responses as key-value mappings (objects). This could lead to problems with headers of the same name:

Content-Type: text/plain
Set-Cookie: key1=sample content 1
Set-Cookie: key2=sample content 2
Set-Cookie: key3=sample content 3

vs.

Content-Type: text/plain
Set-Cookie: key1=sample content 1; key2=sample content 2; key3=sample content 3

I did not test the behavior and I did not bump into any problems with it. I just spotted this possible flaw when reading documentation and I wanted to point it out. This problem should be verified first.

@netmilk
Copy link
Contributor

netmilk commented Feb 1, 2016

This is know limitation of the current implementation:

  • order of headers in the AD is ignored
  • it's not possible to use same header multiple times, value of the last defined header is used

@netmilk netmilk changed the title Transaction objects contain headers as key-value mapping Headers order and using same header multiple times Feb 1, 2016
@netmilk
Copy link
Contributor

netmilk commented Feb 1, 2016

I'm sorry, AD = API Description a.k.a API Blueprint document :)

honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Aug 29, 2017
Close #9
Related to apiaryio/dredd#356
Related to apiaryio/fury-adapter-swagger#129

BREAKING CHANGE: This changes the structure of Dredd Transactions' output.
Previously, the request and response headers would be provided as an object

    {'Content-Type': {'value': 'application/json'}, ...}

This is now array

    [{'name': 'Content-Type', 'value': 'application/json'}, ...]
honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Oct 19, 2017
Close #9
Related to apiaryio/dredd#356
Related to apiaryio/fury-adapter-swagger#129

BREAKING CHANGE: This changes the structure of Dredd Transactions' output.
Previously, the request and response headers would be provided as an object

    {'Content-Type': {'value': 'application/json'}, ...}

This is now array

    [{'name': 'Content-Type', 'value': 'application/json'}, ...]
honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Oct 25, 2017
Close #9
Related to apiaryio/dredd#356
Related to apiaryio/fury-adapter-swagger#129

BREAKING CHANGE: This changes the structure of Dredd Transactions' output.
Previously, the request and response headers would be provided as an object

    {'Content-Type': {'value': 'application/json'}, ...}

This is now array

    [{'name': 'Content-Type', 'value': 'application/json'}, ...]
honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Nov 13, 2017
Close #9
Related to apiaryio/dredd#356
Related to apiaryio/fury-adapter-swagger#129

BREAKING CHANGE: This changes the structure of Dredd Transactions' output.
Previously, the request and response headers would be provided as an object

    {'Content-Type': {'value': 'application/json'}, ...}

This is now array

    [{'name': 'Content-Type', 'value': 'application/json'}, ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants