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

response_transformer: option to not overwrite header #393

Closed
jkarneges opened this issue Jul 12, 2015 · 1 comment
Closed

response_transformer: option to not overwrite header #393

jkarneges opened this issue Jul 12, 2015 · 1 comment
Assignees
Labels
task/feature Requests for new features in Kong
Milestone

Comments

@jkarneges
Copy link

When I try to add a header that already exists, the original is overwritten. This is for a type of header that can appear multiple times.

Perhaps you could add another option, value.concat.headers, where any headers specified would be added without removing any that already exist. That or the original header is rewritten as a comma-separated list of all the values (both forms are synonymous according to the HTTP spec).

@sonicaghi sonicaghi added task/bug idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports. labels Jul 12, 2015
@thibaultcha thibaultcha added [about] plugins task/feature Requests for new features in Kong and removed idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports. task/bug labels Oct 15, 2015
shashiranjan84 pushed a commit that referenced this issue Nov 18, 2015
Part of the fix for issue #393. New property `concat` added to support adding new value to existing header/querystring. If header/querystring does not exist, a new one will be added
shashiranjan84 pushed a commit that referenced this issue Nov 18, 2015
Part of the fix for issue #393. New property `concat` added to support adding new value to existing response header. If header  does not exist, a new one will be added
shashiranjan84 pushed a commit that referenced this issue Dec 17, 2015
Now add will only add header if it does not exist,  config `append` added to support adding new value to existing header. If header does not exist, a new one will be added. config `replace added to replace the value of existing header with new value
shashiranjan84 pushed a commit that referenced this issue Dec 17, 2015
Now add will only add header/querystring/form parameter if it does not exist,  config `append` added to support adding new value to existing header/querystring. If header/querystring does not exist, a new one will be added. config `replace added to replace the value of existing headers/querystrings/form parameters with new value
shashiranjan84 pushed a commit that referenced this issue Dec 21, 2015
Now add will only add header if it does not exist,  config `append` added to support adding new value to existing header. If header does not exist, a new one will be added. config `replace added to replace the value of existing header with new value
@thibaultcha thibaultcha added this to the Jan 2016 milestone Dec 21, 2015
shashiranjan84 pushed a commit that referenced this issue Dec 22, 2015
Part of the fix for issue #393. New property concat added to support adding new value to existing header/querystring. If header/querystring does not exist, a new one will be added
shashiranjan84 pushed a commit that referenced this issue Dec 23, 2015
Now add will only add header/json if it does not exist,  config `append` added to support adding new value to existing header/json. If header does not exist, a new one will be added. config `replace added to replace the value of existing header/json with new value
shashiranjan84 pushed a commit that referenced this issue Dec 23, 2015
…string

Fix for issue #393 for response-transformer motivated fix for this plugin too. New config append/replace added to support adding new value to existing header/querystring and
replcaing  existing header/querystring with new value.
shashiranjan84 pushed a commit that referenced this issue Dec 23, 2015
Fix for issue #393 for response-transformer motivated fix for this plugin too. New config append/replace added to support adding new value to existing header/querystring and
replcaing  existing header/querystring with new value.
thibaultcha added a commit that referenced this issue Dec 25, 2015
[fix/response-transformer] fix for issue #393
shashiranjan84 pushed a commit that referenced this issue Dec 27, 2015
Fix for issue #393 for response-transformer motivated fix for this plugin too. New config append/replace added to support adding new value to existing header/querystring and
replcaing  existing header/querystring with new value.
subnetmarco pushed a commit that referenced this issue Jan 21, 2016
Fix for issue #393 for response-transformer motivated fix for this plugin too. New config append/replace added to support adding new value to existing header/querystring and
replcaing  existing header/querystring with new value.
subnetmarco added a commit that referenced this issue Jan 22, 2016
commit d6633e9
Author: thefosk <[email protected]>
Date:   Wed Jan 20 19:46:43 2016 -0800

    Configuration in API - force-leave in API - additional check for luajit

commit e7ce5d6
Author: Thibault Charbonnier <[email protected]>
Date:   Thu Dec 24 01:12:11 2015 -0800

    fix(api) allow to delete APIs and Consumers by name

commit cf4ea3a
Author: Thibault Charbonnier <[email protected]>
Date:   Wed Dec 23 20:17:58 2015 -0800

    docs(readme) update getkong links to https

commit 738cd8e
Author: Thibault Charbonnier <[email protected]>
Date:   Wed Dec 23 15:48:19 2015 -0800

    docs(readme) add more development instructions

    The different test suites and the way test/development running Kong need
    a different configuration file can be confusing at first, so this adds
    some more insight as to what is needed and why.

    Of course, this is the current system but nothing prevents it from being
    improved in the future.

commit 4ea5b2b
Author: thefosk <[email protected]>
Date:   Sat Oct 17 03:03:38 2015 -0700

    Adding cache API - CLI Rewrite - Serf integration/Clustering - Hooks/Events - Invalidations

commit 9f1ffb3
Author: Shashi Ranjan <[email protected]>
Date:   Tue Nov 17 18:37:00 2015 -0800

    fix(resp-tranformer) handle already existing headers

    Now add will only add header/json if it does not exist, config `append` added to support adding new value to existing header/json. If header does not exist, a new one will be added. config `replace added to replace the value of existing header/json with new value

commit 20d4b72
Author: Shashi Ranjan <[email protected]>
Date:   Mon Dec 21 16:39:33 2015 -0800

    refactor(req-transformer) append, replace of header/querystring

    Fix for issue #393 for response-transformer motivated fix for this plugin too. New config append/replace added to support adding new value to existing header/querystring and
    replcaing  existing header/querystring with new value.

commit 5feacd1
Author: Thibault Charbonnier <[email protected]>
Date:   Thu Dec 24 01:12:11 2015 -0800

    fix(api) allow to delete APIs and Consumers by name

    Cassandra from 3 to 2 during an update and a delete, it removed the
    possibility of updating and deleting APIs and Consumers by their name,
    because that change made it so the base_dao's underlying `delete()` and
    `update()` were directly used instead of first querying the entity.
    Querying the entity first allowed to retrieve its PRIMARY KEY fields,
    and hence `delete()` and `update()` never complained. But by removing
    this initial retrieving, we removed this feature, and **there were not
    tests** for it!

    - This adds test for PATCH/DELETE APIs and Consumers by name/username
    - Adds an argument to the base_dao `update()` and `delete()` to select
      by any field rather than only the PRIMARY KEY fields.

commit 32b9945
Author: Thibault Charbonnier <[email protected]>
Date:   Wed Dec 23 20:17:58 2015 -0800

    docs(readme) update getkong links to https

commit 6c31ec5
Author: Thibault Charbonnier <[email protected]>
Date:   Wed Dec 23 15:48:19 2015 -0800

    docs(readme) add more development instructions

    The different test suites and the way test/development running Kong need
    a different configuration file can be confusing at first, so this adds
    some more insight as to what is needed and why.

    Of course, this is the current system but nothing prevents it from being
    improved in the future.
@shashiranjan84
Copy link
Contributor

@jkarneges we released kong 0.6.0 with the fix. now 'add' only add if header is not already set. we also 'append' to append values to already set header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task/feature Requests for new features in Kong
Projects
None yet
Development

No branches or pull requests

5 participants