Why does TAS change the case on my request headers?
search cancel

Why does TAS change the case on my request headers?

book

Article ID: 297389

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

You notice that some of the request headers received by your application are being case changed. This article discusses where the case conversion is happening in TAS and how applications should be processing request headers.

Resolution

TAS converts the header case specifically with the net.http golang library that the Gorouter is using. The /net/http Golang library uses CanonicalHeaderKey to convert the response header strings and as of writing this there is no option to turn it off. If we check into the http spec, the headers are also specified as case-insensitive.
 

Applications processing should be able to process request headers in a case-insensitive way because there is no guarantee that TAS or Gorouter will preserve case sensitivity.

An net/http Golang reference can be found here.