ERR_SPDY_PROTOCOL_ERROR Ajax .net web api

For me the issue was that I was sending an empty Authorization header.

The login to my app (an AngularJS SPA) sends a username/password in a JSON object, and if the login is valid then a JWT is returned which is then used for the Authorization header - e.g. Bearer {JWT} for future API requests.

Not sending an Authorization header when there was nothing to send fixed the issue.


The solution for me was that Chrome was being strict on the format for the Authorization header.

The format of the header is scheme token, and its important that you don't include a colon after the scheme. My older style code had the format Bearer: thetoken, which was failing. I changed it to Bearer thetoken and now everything is working correctly.

headers: {
    'Authorization': 'Bearer ' + token
}