Closed pp23 closed 6 years ago
Are you sure you are at the right repository? We do not have a method called ´getHeader`.
Hi,
sorry, getHeader is a function of an adapter which returns the header-member from the Request-class. The error is, that I work on the temporary copy which is made on return of the headers. An iterator on the temporary map is of course only valid until the temporary copy goes out of scope, which is already at the next code line ;-)
Hi,
maybe I have encountered a bug with request->header:
With this code I get the following output:
[2017-Nov-27 21:37:26]: it: authorization :: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MTE4OTkzNzAsInJvbGUiOiJhZG1pbiIsInVpZCI6MX0.oqaOenulprBubko6fYmtuPGrxwDq1VbJ0t59iR2YpgE
[2017-Nov-27 21:37:26]: authHeaderIt: authorization :: s03sIsInR5c}3�|3eHAiOjE1%(��.ss��9;��EX�x.sss<erIt:
As you can see there are some non-ascii characters in the output when getting the value from the request header. When making a copy of the headers first, the output is ok. I still had not the time to check this in the code, but it seems, that the headers get manipulated during the execution of the resource-function?