created at 07-07-2021 views: 9

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: 


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.


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

               --> error = "Invalid character 0x1A in header value."
               --> header_name = "content-disposition"
               --> header_value = "attachment;filename=%1AXa.V%B0U.xlsx"


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.

created at:07-07-2021
edited at: 07-07-2021: