BETA - Breaking Bug: Corrupt response for smugmug.albums.getStats against 1.1.1

luke_churchluke_church Registered Users Posts: 507 Major grins
NB: This is a breaking change. If Beta went live as is, it might break things (like my XML-Parser :): )

Description: Response to album.getStats against XML-RPC 1.1.1 is damaged, in a number of ways:

1 - The response does not require the optional 'Heavy' and seems to assume that it defaults to true. It changes the return type to an array from a struct. This breaks tight Object bound de-serialisers. (e.g. XML-RPC.NET)

2 - The nested array under member name 'Images' is corrupt. It contains ImageIDs, but then 'FaultCode 4' rather than statistics. This may be another manifestation of the imageStats bug.

Sample XML below: XML-RPC 1.1.1: (Clipped to fit within 20K chars post limit)

[php]
<?xml version="1.0"?>
<methodCall>
<methodName>smugmug.albums.getStats</methodName>
<params>
<param>
<value>
<string>...</string>
</value>
</param>
<param>
<value>
<i4>801895</i4>
</value>
</param>
<param>
<value>
<i4>9</i4>
</value>
</param>
<param>
<value>
<i4>2005</i4>
</value>
</param>
</params>
</methodCall>
Header
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>AlbumID</name>
<value>
<int>801895</int>
</value>
</member>
<member>
<name>Bytes</name>
<value>
<int>487233</int>
</value>
</member>
<member>
<name>Tiny</name>
<value>
<int>124</int>
</value>
</member>
<member>
<name>Thumb</name>
<value>
<int>5</int>
</value>
</member>
<member>
<name>Small</name>
<value>
<int>1</int>
</value>
</member>
<member>
<name>Medium</name>
<value>
<int>9</int>
</value>
</member>
<member>
<name>Large</name>
<value>
<int>2</int>
</value>
</member>
<member>
<name>Original</name>
<value>
<double>3.000000</double>
</value>
</member>
<member>
<name>Images</name>
<value>
<array>
<data>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655765</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655777</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655786</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655795</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655799</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655807</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655819</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655826</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655834</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655842</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655849</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655858</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655864</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655868</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655874</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655878</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655889</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655900</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655906</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655911</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655919</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655928</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655933</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655948</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655965</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655970</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655978</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655986</string>
</value>
</member>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ImageID</name>
<value>
<string>35655991</string>
</value>
</member>
.....
</methodResponse>

[/php]
Sign In or Register to comment.