[Apiman-user] Apiman returning only a single set-cookie header in response
Marc Savy
marc.savy at redhat.com
Fri Apr 13 15:11:33 EDT 2018
BTW just to confirm this already works as expected on the Vert.x gateway.
Now for the Servlet after alterations:
$ curl -kv 'http://localhost:7777/gateway/test/test/100' -H
"isle:mahe" -H "isle:praslin"
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 7777 (#0)
> GET /gateway/test/test/100 HTTP/1.1
> Host: localhost:7777
> User-Agent: curl/7.54.0
> Accept: */*
> isle:mahe
> isle:praslin
>
< HTTP/1.1 200 OK
< Date: Fri, 13 Apr 2018 19:10:50 GMT
< Content-Type: application/json
< Response-Counter: 37
< Transfer-Encoding: chunked
< Server: Jetty(9.2.20.v20161216)
<
{
"method" : "GET",
"resource" : "/bar",
"uri" : "/bar",
"headers" : {
"entries" : [ {
"User-Agent" : "curl/7.54.0"
}, {
"isle" : "mahe"
}, {
"isle" : "praslin"
}, {
"Accept-Encoding" : "gzip"
}, {
"Connection" : "Keep-Alive"
}, {
"Accept" : "*/*"
}, {
"Host" : "localhost:9998"
} ],
"empty" : false
},
"bodyLength" : null,
"bodySha1" : null,
"counter" : 37
* Connection #0 to host localhost left intact
On 13 April 2018 at 20:10, Marc Savy <marc.savy at redhat.com> wrote:
> Hi Stephen,
>
> I've made a PR that I believe addresses this:
> https://github.com/apiman/apiman/pull/658
>
> Will be merged shortly unless anyone finds issues with it.
>
> Regards,
> Marc
>
> On 13 April 2018 at 15:10, Marc Savy <marc.savy at redhat.com> wrote:
>> I can now now recall the details on this.
>>
>> In short, this issue is only apparent on the Servlet implementation
>> and should work fine on the Vert.x Gateway.
>>
>> I'll try to fix it for the Servlet implementations, also.
>>
>> I'll report back to this thread shortly.
>>
>> Regards,
>> Marc
>>
>> On 13 April 2018 at 13:38, Marc Savy <marc.savy at redhat.com> wrote:
>>> Incidentally, my reference for that is:
>>>
>>> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 and
>>> http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2
>>>
>>> Which I discovered in turn from
>>> https://stackoverflow.com/a/4371395
>>>
>>> Just asking whether this works for you, because I believe some
>>> applications (incorrectly, AFAICT) can't cope with this.
>>>
>>> On 13 April 2018 at 13:36, Marc Savy <marc.savy at redhat.com> wrote:
>>>> Hi Stephen,
>>>>
>>>> Interesting issue. Is this on the Servlet or Vert.x gateway implementation?
>>>>
>>>> I think we might be able to work around it by appending same-key
>>>> values into a single value.
>>>>
>>>> i.e.
>>>>
>>>> Foo = Bar
>>>> Foo = Baz
>>>>
>>>> becomes
>>>>
>>>> Foo = Bar, Baz
>>>>
>>>> Would that be acceptable for you?
>>>>
>>>> I'll have to investigate how the underlying platforms handle this
>>>> case. I have a vague memory of working on something in this area
>>>> before, so I'll have to dig in to see what the state of things is.
>>>>
>>>> Regards,
>>>> Marc
>>>>
>>>> On 13 April 2018 at 01:31, Stephen Henrie <stephen at chassi.com> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I have a service that needs to return multiple set-cookie headers back to
>>>>> the requesting browser, but I am only seeing one set-cookie header being
>>>>> returned from apiman. Has anyone else tried this or know of any issues
>>>>> returning multiple headers of the same name but with different values?
>>>>>
>>>>> This multiple set-cookie headers in the response scenario is commonly
>>>>> supported by web servers and browsers.
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Stephen
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Apiman-user mailing list
>>>>> Apiman-user at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/apiman-user
>>>>>
More information about the Apiman-user
mailing list