-
Notifications
You must be signed in to change notification settings - Fork 15
Labels
bugSomething isn't workingSomething isn't working
Description
After updating from 0.5.1 to 0.8.0 I started getting the following error message:
Header 'Authorization' is a reserved HTTP header and should not be set via custom headers. Setting this header may cause authentication failures, request corruption, or other unexpected behavior. Reserved headers include: Authorization, Content-Type, Content-Length, Host, Accept, Accept-Encoding, Transfer-Encoding, Connection, Cookie, Set-Cookie, Date. (Parameter 'DefaultHeaders')
After some digging I see that the when using ApiToken the Authorization header is set on DefaultHeaders here:
| _configuration.DefaultHeaders["Authorization"] = |
and then when creating a new api client it validates that the Authorization header is not in DefaultHeaders here:
| if (ReservedHeaders.Contains(header.Key)) { |
This causes the application to crash. This seems contradicting to me, or am I missing something?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
In review