net::ERR_SPDY_PROTOCOL_ERROR bug

created at 07-07-2021 views: 3

problem description

The excel table export function was added in the latest launch. The local ok, the test environment is ok, and the production environment is https. Click the export button in chrome, and https always reports an error: 

net::ERR_SPDY_PROTOCOL_ERROR

Can't figure out why, it feels like https request is blocked. But the test environment does not have this problem, because the test environment is http, but there is no problem in Firefox and IE. The interface is also ok in postman. Could it be that the powerful chrome has made any restrictions on https? Visit the chrome://net-internals/#events tool. My chrome version is 81. I re-downloaded the old version 69.0.3497.81 for debugging. Enter the corresponding domain name in the search box, click Export again, and select the line where the Source Type is HTTP2_SESSION.

HTTP2_SESSION

You can see the following prompt in the log on the right

t=  4891 [st=30]  HTTP2_SESSION_RECV_INVALID_HEADER
               --> error = "Invalid character 0x1A in header value."
               --> header_name = "content-disposition"
               --> header_value = "attachment;filename=%1AXa.V%B0U.xlsx"

solution

It is suggested that the value value of the content-disposition attribute in Respone Header has illegal characters. Because the chrome browser parses the HTTPS header information strictly, there will be no response to directly report the error net::ERR_SPDY_PROTOCOL_ERROR, and the problem is finally found.

Please log in to leave a comment.

Table of Conents