WebSocket and headers
search cancel

WebSocket and headers

book

Article ID: 257832

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

We are facing a problem when creating a websocket connection to a backend.
It's seems to be problem, when the client is sending the User-Agent header in the incoming connection to the gateway .

When debugging we see the following 

GET / HTTP/1.1
Accept-Encoding: gzip
User-Agent: Jetty/9.4.43.v20210629
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
Cache-Control: no-cache
DNT: 1
Pragma: no-cache
Sec-Fetch-Dest: websocket
Sec-Fetch-Mode: websocket
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: <WebSocket_key>
Sec-WebSocket-Version: 13
Pragma: no-cache
Cache-Control: no-cache
Sec-WebSocket-Extensions: permessage-deflate
Host: localhost:10000

So you see the User-Agent header exist twice
User-Agent: Jetty/9.4.43.v20210629
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Environment

Release : 10.1

Resolution

This is issue was reproduced and is caused by the jetty libraries used  , engineering will provide a solution for this in gateway 10 CR3