Skip to Content

Recently while checking the web dispatcher trace file in my test system I could notice some weird  entries in web dispatcher (dev_webdisp) trace file. I admit it took a while for me to understand how the logic behind these entries works and from where the entries appear , rather ‘WHY’… reading code helps! 😉

Also I must admit the issue which I faced was that web dispatcher was functioning “okay” but there were lots of these weird entries which was irritating as this kept filling the trace file.

The Entries

The entries which I am talking about are :

*** In dev_webdisp trace file

ERROR => IctWsHttpCheckUpgradeRequest: Invalid HTTP version in WebSocket Upgrade request (1.0) [ictws.c      2386]
 ERROR => Invalid HTTP version in WebSocket Upgrade request {00050033} [http_plg_ws.c 459]

 

First step

By reading these entries ( the 1st line ) I came to know it had something to do with websocket and upgrade and invalid request. That’s it I didn’t understand anything beyond this initially.To check what these entries meant first I understood about what are “websockets” and why I should worry about them.

What is a web socket?

Definition states that “WebSocket provides a bi-directional communication channel over a TCP/IP socket. It is designed to be implemented in web browsers and web servers, but in general it can be used by any client or server application”

It has some advantages over native HTTP such as in a pure HTTP connection, each action of the server requires a previous request from the client, in the case of the WebSocket protocol, when the client opens the connection, it is sufficient. The server can then actively use this open connection and can deliver new information to the client without waiting for a new connection from the client.

Basically it is internally available since web dispatcher 7.40

Some important links from which I learned more about the web socket :

SAP blog : ABAP Channels Part 1: WebSocket Communication Using ABAP Push Channels

SAP document : APC-WebSocket Communication

 

Troubleshooting

Now that I understood what I am dealing with I tried to decode what the entries in the trace file meant.

Lets break it word-by-word.

1st Line: IctWsHttpCheckUpgradeRequest: Invalid HTTP version in WebSocket Upgrade request

>> IctWsHttpCheckUpgradeRequest : Mechanism implemented in SAP to check the valid web socket upgrade request. If the request is valid then it should return a web socket key.

Invalid HTTP version : Clearly the web socket upgrade request is invalid.It is either outdated or unsupported.

2nd Line : It enhances the first line.

By this time I came to know that my web socket upgrade request was invalid one.Now when I dig deeper I can see that if there is a function to check the web socket version then it must have a function which is responsible for creating this request as well.Take note this function will create the request based on the HTTP response and it will add this HTTP header fields to turn it into a webSocket Upgrade response.

I came to know for this to function the minimum supported HTTP version must be HTTP 1.1.

Anything beyond that HTTP/2 is always welcome ( its supported 😉 )

So , I knew where my problem lay..

 

Revelation

As soon as I came to know this I quickly checked my browser’s HTTP support version. It was HTTP 1.0.

How to check this ?

Internet options -> Advanced -> HTTP settings -> Here you will come to know the by checking the checked options

 I later on corrected this by updating my browser ( also in case your browser supports 1.1 and onwards you can check these options instead of updating the browser.

Post updating the settings I can see the browser settings as HTTP 1.1 , HTTP 2

While studying the issue I could see for Microsoft edge browser we observed this once with an old version of Microsoft Edge. (This bug has already been fixed by Microsoft: W3C WebSocket upgrade GET request uses HTTP/1.0 instead of HTTP/1.1)

In case you want to know more about the HTTP/2 please refer HTTP/2 Support and to implement the HTTP/2 feature please see the SAP blog “Connectivity News in AS ABAP 7.51

 

Regards,

Manjunath Hanmantgad

 

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply