Details
Description
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:
<?xml version="1.0" encoding="utf-8"?><partial-response><changes><update id="javax.faces.ViewState"><![CDATA[....
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.