We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

doc.Save(this.Response in Google Chrome

When saving to the response as follows, if the file name contains a comma in Google chrome an error is shown "multiple distinct content-length headers received. this is disallowed to protect against http response-splitting attacks." with this code:

Document doc = new Document();
Aspose.Words.Saving.SaveOptions saveOptions = new Aspose.Words.Saving.DocSaveOptions();
saveOptions.SaveFormat = Aspose.Words.SaveFormat.Doc;
doc.Save(this.Response, "A,B.C.doc", ContentDisposition.Attachment, saveOptions);

The workaround is to use a memory stream and handle the output manually, however since this option is built-in you ought to fix it.

Hi Dave,


Thanks for your inquiry. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13135. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Somewhere in your aspose.words code you will have code like this:


Response.AddHeader(“Content-Disposition”, “attachment; filename=” + filename);

it needs to be fixed to become

Response.AddHeader(“Content-Disposition”, “attachment; filename=”" + filename + “”");

or even better:

Response.AddHeader(“Content-Disposition”, “attachment; filename*=UTF-8’’” + Uri.EscapeDataString(filename));

Or refer to your code in Aspose.Cells the error is misleading the underlying problem is the comma confuses chrome.
Hi Dave,

Thanks for your inquiry. We have logged your comment against the linked issue and will let you know via this thread as soon as it is resolved. We apologize for your inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-13135) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.