-
Notifications
You must be signed in to change notification settings - Fork 34
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
Collsion in response and request headers #281
Comments
Can you give me an example on this? Because it works as intended, afaik: # @name REQUEST_FOOBAR
POST https://httpbin.org/post HTTP/1.1
Date: Foobar
{
"foo": "bonobo",
"foobar": true
}
> {%
client.log(request.headers.findByName("Date").getRawValue());
client.log(response.headers.valuesOf("Date").value);
%} This outputs:
The first one is the header from the request and the second one the header from the response. |
Its more i wrote wrong description,
When i try get access to header you get last one |
RFC 2616 says it is possible to send multiple values in separate header lines only when it is possible to also combine the values by comma in one header line. Currently it is not supported in Kulala. Some implementation always return an array, some will combine these to a comma separated list (which I think is the only solution to have backward compatibility) |
In jetbrains it's looks like
|
Will try in jetbrains and see if we can implement it in kulala. |
What is the result when there is only one occurrence? A string (so the caller has to check the result type) or an array with one element (that would be a breaking change in scripts). we need to decide what we do with the Request Variables: vscode-rest-client returns the first one. As RFC defines all implementations must accept both forms maybe we return the comma list at least in Request Variables. if you test against JetBrains please also check if they deliver an array if given as list in one header. |
I don't use JetBrains, but my college use like this
|
If response or request have header with same name, response.headers.valuesOf('Header name') return last header
The text was updated successfully, but these errors were encountered: