ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION

Recently when trying to server up some images that were stored in an Azure storage container, we were noticing that the files presented this error message when using Chrome (but Fiddler traces showed success and it worked fine in other browsers).

image

It turns out this was not caused by duplicate header values being added to the response but instead it was because the image file name contained a comma that was not properly escaped by putting double quotes around the filename like this:

Response.AddHeader("Content-Disposition", "attachment;filename=\"" + filename + "\"");
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s