-
Notifications
You must be signed in to change notification settings - Fork 262
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
case sensitivness in httpCustom notification #2893
Comments
Good catch! :) Some hints, hoping to help to find a solution... The parameters used to send a custom notification are buit by the
The headers map ends as a field in the parameter object (of
Next, let's jump to the place where the parameter are used, i.e.
The In
The problem would be due to the Possible solutions ideas:
|
@fgalan Yes I think that converting everything to lowercase before the |
@arigliano , let's try with the easiest solution:
Some additional comments:
Don't hesitate to ask if you have some doubt regarding implementation. |
In order to implement the proposed solution, following steps should be performed:
|
In any case, it could be better to modify the signature of httpHeaderAdd function, by replacing the input string headerString with headerValue, in order to avoid the redundance when passing first headerName and then the complete header (possible cause of errors), such as: |
As far as I remember, HTTP headers are case insenstive by definition, so it would be a "legal" change from the point of view of backward compability. However, let's consider the potential impact in .test... all them are aligned with the current way of rendering headers (e.g. Content-Type, Fiware-Corrrelator, etc.). |
With regards to signature change, it makes sense to me. However, let's see how it looks like at PR time. @kzangeli what do you think? |
With regards to signature change, it makes sense to me too |
Fixed by PR #3024 |
@cdupont , the issue has been fixed in master branch. As original author of the issue, it would be great if you could check now (maybe using the docker at dockerhub). If your check goes fine, the issue can be closed. If your check goes ok, new information can be provided. Thanks! (We would keep the issue opened until the end of the 1.10.0 development cycle, e.g. around 0.5-1 months from now on. The issue will be closed if we don't have any news by this time, assuming it was fixed). |
Hi guys, |
Ok. Closing. Thx! |
A small bug, but that can bite (it did ;).
I tried to create a notification with Orion, using httpCustom and a
Content-Type: application/json
.I used the encoding suggested at: http://fiware-orion.readthedocs.io/en/master/user/forbidden_characters/#custom-payload-special-treatment
Listening on the notification port I get:
You see that
Content-Type
is repeated twice, with different cases. This didn't work well with my provider.If I put
Content-type
in the httpCustom headers, it works.As per: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
field names should be case-insensitive.
Thanks!
The text was updated successfully, but these errors were encountered: