Layer7 API Management

 View Only
  • 1.  Headers are getting convert into lower case?

    Posted Jan 17, 2018 06:16 AM

    Hello Folks,

     

    I am facing issue when client is sending Headers in CAPITAL letters, those headers are being converted into lower by API Gateway.

     

    I tried with POSTMAN and SOAP UI client to check the same and experiencing the same from these two as well.

     

    I tried MESSAGE_ID and MESSAGE_TYPE which is being converted in lowercase as i log all request headers in API gateway.

     

    Headers Request : accept-encoding:gzip,deflate, connection:Keep-Alive, content-type:application/json, host:uose01.caapim.com, message_id : ddaswwq54353fjasgfs, message_type: f634264dadgagf.



  • 2.  Re: Headers are getting convert into lower case?

    Posted Jan 17, 2018 06:32 AM

    Hi Apoorv,

     

    If you want to convert the small letter Header names to Capital Letter Please use the Transport  Properties/Header Properties to transform the Header.

     

    You just need to replace the header name as shown below and select TARGET as request

     

    Please find the below screenshot for your reference

     

     

    Please do correct me if I am wrong.

     

     

    Thanks,

    Irfan



  • 3.  Re: Headers are getting convert into lower case?

    Posted Jan 17, 2018 06:45 AM

    Hello Irfan,

     

    Thanks for the suggestion but it doesn't make sense. as I have almost 35 headers in the request, and API gateway is just acting as a proxy and if i do so what you have suggested i need to add the same assertion 35 times and more if header no. increase later.

     

    I am more concern about why API gateway is behaving like that, do i need to change some global properties or is it a bug ? 



  • 4.  Re: Headers are getting convert into lower case?
    Best Answer

    Broadcom Employee
    Posted Jan 17, 2018 08:49 AM

    Hi Apurva,

     

    Per the RFC (2616, Section 4.2), header names are designed to be case insensitive so I wouldn't think this to be a bug.

    My guess would be that was done possibly in preparation for future support of HTTP/2.

     

       Just as in HTTP/1.x, header field names are strings of ASCII    characters that are compared in a case-insensitive fashion.  However,    header field names MUST be converted to lowercase prior to their    encoding in HTTP/2

    Apache Tomcat has also had some reports of this 

    58464 – servletRequest.getHeaderNames() returns all header names in lower case 

     

    You may wish to open an idea here on communities to see the feasibility of changing this for future releases.

     

    Regards,

    Joe