MetadataProvider creates backup metadata with invalid encoding "UTF8"
Basics
Technical
Logistics
Basics
Technical
Logistics
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").
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.
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").