MetadataProvider creates backup metadata with invalid encoding "UTF8"

Description

When shibd retrieves metadata via HTTPS/HTTP it writes out a local backup copy with an invalid encoding ("UTF8" instead of "UTF-8") in the XML processing instructions at the beginning of the file.
The invalid encoding is not part of the metadata file, also tracing the network traffic shows that those PIs with the invalid encoding are not transmitted over the wire. strace(1) shows it's written to disk though. I poked around a bit in the code but had no idea where to look for (xerces setEncoding method?).

Unless I'm mistaken in my testing this happens whether the metadata hosted via HTTP/S is signed or unsigned, as well as if it already contains those PIs with a correct encoding or does not contain any PIs.
This was with validation turned on, but turning this off does not change things.

This is with 2.2 (don't have anything else round anymore) and still seems to be the case with 2.2.1.

Checking the local metadata backup copy of the spaces wiki (e.g. for aconet-aai) should also show this (and xmlwf will complain about "unknown encoding").

Environment

RHEL5.3 with official RPMs

Activity

Show:

peter August 21, 2009 at 9:53 AM
Edited

Didn't scroll far enough in Jira to find the "xmltooling" project
Thanks for the quick fix.

Scott Cantor August 21, 2009 at 9:40 AM

The declaration is from Xerces when I serialize the DOM back out. I'm setting an encoding property for the serializer, but it must be treating "UTF8" as a synonym.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Affects versions

Created August 21, 2009 at 9:03 AM
Updated June 22, 2021 at 8:48 PM
Resolved August 21, 2009 at 9:42 AM