I suggest you ...

Don't change header capitalization when sending it to the server!

If I send an Authorization header it shows up as authorization..

1 vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    K PK P shared this idea  ·   ·  Admin →
    declined  ·  Lukas LinhartLukas Linhart responded  · 

    Unfortunately, we can’t do that in the near future. Normalising headers is part of how some of our infrastructure works, and it’s not possible to change that in the near future.

    I know it can be annoying for some purposes, but ultimately, it shouldn’t matter; header names are case insensitive: https://tools.ietf.org/html/rfc7230#section-3.2

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Lukas LinhartAdminLukas Linhart (Admin, apiary.io) commented  · 

        No, we don't depend on it, but some parts of our infrastructure is normalising it and we can't get rid of it easily.

        You are correct, however, about the values being shown in inspector (values are normalised after they leave our system). I'll file a bug for us to fix that; thanks for the report!

        Out of curiosity, may I ask which system was requiring the exactly-cased Authorization header? Thanks!

      • K PK P commented  · 

        it's funny that you tell me headers are case-insensitive but yet your infrastructure somehow depends on it being normalized. That sounds like an excuse to me.

        In my case, I was sending the Authorization header.. the debug output in Apiary says it's sending the Authorization header, not "authorization". In essence, Apiary makes effort to actually lie to the user. This is not good. You should rewrite the header in the UI too. It took an hour to figure out why Auth wasnt working.

      Feedback and Knowledge Base