[Issue#] N/A
[Problem] Though content encoding is specified the actual encoding value
is taken from type attribute if type attribute is set after encoding
attribute in the configuration file.
[Cause] Value from the last attribute parsed overwrites encoding of the
page even if it has been already read from encoding attribute.
[Solution] Check while parsing type attribute whether encoding has
already been set.
[SCMRequest] N/A
[Verification]
1. Build repository.
2. Run `wrt-extra-tests-w3c --output=text --regexp='ta_aaaaaaaaaa_z1'`
Change-Id: Ie49f4caf4111e3de00394a203acc3cee805d33de
m_type = value;
MimeTypeUtils::MimeAttributes mimeAttributes =
MimeTypeUtils::getMimeAttributes(value);
- if (mimeAttributes.count(L"charset") > 0) {
+ if ((mimeAttributes.count(L"charset") > 0) && m_encoding.IsNull())
+ {
m_encoding = mimeAttributes[L"charset"];
}
} else if (attribute.name == L"encoding") {