Jun 23, 2016, 11:12 AM
[OPEN] [#1351] [4.1.0] Chrome 49+ multipart/form-data issue
Hello everyone,
I'm using the HTML editor field and the File Upload Field on the same page. This page is used for editing emails. Because of rich templates that contain conditional comments with styles for particular email clients the resulting HTML can be few hundreds of KB.
When the content of HTML is pretty big every postback freezes Chrome for a long time (15-70 sec).All other browsers work fine on that page.
After some investigations I found out that the actual request is processed in a few milliseconds, but parsing of the result takes so long. If I delete the File Upload Field from the page the "content type" of postbacks becomes "application/x-www-form-urlencoded" instead of "multipart/form-data" and the response processing time decreases to few seconds.
Here is the comparison of the request timelines:
The issue can be reproduced easily using this sample code:
PS: This issue appeared recently but the code wasn't updated for a while. This might be related to the changes between different Chrome versions (The "improvements" of the latest versions).
I'm using the HTML editor field and the File Upload Field on the same page. This page is used for editing emails. Because of rich templates that contain conditional comments with styles for particular email clients the resulting HTML can be few hundreds of KB.
When the content of HTML is pretty big every postback freezes Chrome for a long time (15-70 sec).All other browsers work fine on that page.
After some investigations I found out that the actual request is processed in a few milliseconds, but parsing of the result takes so long. If I delete the File Upload Field from the page the "content type" of postbacks becomes "application/x-www-form-urlencoded" instead of "multipart/form-data" and the response processing time decreases to few seconds.
Here is the comparison of the request timelines:
The issue can be reproduced easily using this sample code:
<%@ Page Language="C#" AutoEventWireup="true" %>
<script runat="server">
private void PopulateClick(object sender, DirectEventArgs e)
{
var r = new Random();
var content = String.Join("", Enumerable.Range(1, 100 * 1024).Select(_ => r.Next(0, 9).ToString()));
content = String.Format("<p>Small amount of text <!--{0}--> <br/> The second line</p>", content);
Editor.Value = content;
HiddenField1.Value = Convert.ToBase64String(Encoding.UTF8.GetBytes(content));
}
</script>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Html Editor Chrome issue </title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" AjaxViewStateMode="Enabled" ViewStateMode="Enabled"></ext:ResourceManager>
<ext:Hidden runat="server" ID="HiddenField1"></ext:Hidden>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Text="Populate">
<DirectEvents>
<Click OnEvent="PopulateClick" ></Click>
</DirectEvents>
</ext:Button>
<ext:FileUploadField runat="server" Text="File" ID="FileUploadField1"></ext:FileUploadField>
</Items>
</ext:Toolbar>
<ext:HtmlEditor runat="server" ID="Editor" Width="1000" Height="500"></ext:HtmlEditor>
</form>
</body>
</html>
Does anyone know the solution for this issue or at least some hack/workaround?PS: This issue appeared recently but the code wasn't updated for a while. This might be related to the changes between different Chrome versions (The "improvements" of the latest versions).