Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9095E10262 for ; Wed, 18 Dec 2013 15:17:15 +0000 (UTC) Received: (qmail 18971 invoked by uid 500); 18 Dec 2013 15:17:09 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 18877 invoked by uid 500); 18 Dec 2013 15:17:08 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 18855 invoked by uid 99); 18 Dec 2013 15:17:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 15:17:07 +0000 Date: Wed, 18 Dec 2013 15:17:07 +0000 (UTC) From: "Ricardo Tercero Lozano (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (MYFACES-3835) ViewState gets truncated on chrome with richfaces fileupload component MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MYFACES-3835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851828#comment-13851828 ] Ricardo Tercero Lozano edited comment on MYFACES-3835 at 12/18/13 3:16 PM: --------------------------------------------------------------------------- I was able to reproduce this bug using richfaces 4 showcase with these modifications: 1.- replace mojarra implementation for myfaces implementation. 2.- Change view state saving to client. 3.- Set parameter COMPRESS_STATE_IN_CLIENT to true (web.xml modified attached). 4.- replace file upload xhtml and java demo (attached). After uploading a file the viewstate input value gets truncated. was (Author: moevr): I was able to reproduce this bug using richfaces 4 showcase with these modifications: 1.- Change view state saving to client. 2.- Set parameter COMPRESS_STATE_IN_CLIENT to true (web.xml modified attached). 3.- replace file upload xhtml and java demo (attached). After uploading a file the viewstate input value gets truncated. > ViewState gets truncated on chrome with richfaces fileupload component > ---------------------------------------------------------------------- > > Key: MYFACES-3835 > URL: https://issues.apache.org/jira/browse/MYFACES-3835 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 2.1.11, 2.1.13 > Environment: Windows XP, Chrome 31.0.1650.63 m (latest at this moment), tomcat 7.0.37, client state saving, myfaces 2.1.11, richfaces 4.3.1.Final > Reporter: Ricardo Tercero Lozano > Attachments: FileUploadBean.class, FileUploadBean.java, imgUpload-sample.xhtml, web.xml > > > On certain conditions viewstate gets corrupted (truncated). > I've got a page with a richfaces fileupload component. The page works well on IE7 and Firefox (latest), but not in chrome. Digging into Javascript and Ajax response I got some extra info about the problem. I don't know why, but a partial response like: > results in two CDATA sections when handling the response. This is the problem caused by Google Chrome. Inspecting the JSF.JS library, the line that gets de updated view state is: > mfInternal.appliedViewState = node.firstChild.nodeValue; > This line is in 'processUpdate' method. When Chrome, for some reason splits the original CDATA block into two, that line only updates the first section, obtaining a truncated viewState and ViewExpiredException in next request. > The first CDATA section created by Google Chrome has 300 bytes. Weird, but searching Google for 'Chrome cdata 300' appears to be a libxml2 problem. -- This message was sent by Atlassian JIRA (v6.1.4#6159)