[Geoserver-users] Base64 encoded image/png data in multipart WCS GetCoverage response has extra characters at end

We made a WCS GetCoverage request and got a multipart response back from GeoServer. The response contained a base64 encoded image (PNG format). We noticed that the base64 encoded image data that was sent back had extra characters at the very end, after the ‘=’ character, which is a terminator for base64 encoding. The extra characters cause the image to not render in Chromium (version 24.0.1312.56), and FireFox (version 19.0). The extra characters in the response appear to be ignored in Safari and it is able to render the image. The characters after the last ‘=’ character appear to be a bug. For now we are working around the issue by stripping the extra characters in the client.

Entire multipart response can be found here: http://nopaste.info/1b1589fc90.html
The extra characters, ‘AAAAAElFTkSuQmCC’ are at the very end of the response.

The GeoServer information is listed below:

Version
2.3-SNAPSHOT

Git Revision
33da7e570f18c23084d67702d921cab40cec1cde

Build Date
11-Apr-2013 03:40

GeoTools Version
9-SNAPSHOT (rev e757a66c6744d7f944db07a920b9f2632c0afde9)

GeoWebCache Version
1.4-SNAPSHOT (rev 2fc30e12be8678d10fe74d9b82faab1b0ab640de/2fc30e12be8678d10fe74d9b82faab1b0ab640de)

Thanks,

Elridge

On Thu, Apr 18, 2013 at 6:30 PM, Elridge D'Mello <
elridge.dmello@anonymised.com> wrote:

We made a WCS GetCoverage request and got a multipart response back from
GeoServer. The response contained a base64 encoded image (PNG format). We
noticed that the base64 encoded image data that was sent back had extra
characters at the very end, after the '=' character, which is a terminator
for base64 encoding. The extra characters cause the image to not render in
Chromium (version 24.0.1312.56), and FireFox (version 19.0). The extra
characters in the response appear to be ignored in Safari and it is able to
render the image. The characters after the last '=' character appear to be
a bug. For now we are working around the issue by stripping the extra
characters in the client.

Entire multipart response can be found here:
http://nopaste.info/1b1589fc90.html
The extra characters, 'AAAAAElFTkSuQmCC' are at the very end of the
response.

The GeoServer information is listed below:

Version
2.3-SNAPSHOT

Git Revision
33da7e570f18c23084d67702d921cab40cec1cde

Build Date
11-Apr-2013 03:40

GeoTools Version
9-SNAPSHOT (rev e757a66c6744d7f944db07a920b9f2632c0afde9)

GeoWebCache Version
1.4-SNAPSHOT (rev 2fc30e12be8678d10fe74d9b82faab1b0ab640de/2fc30e12be8678d10fe74d9b82faab1b0ab640de)

Hum... we use javamail to compose the mime/multipart message, not sure
where the extra bits are coming from
(we just tell javamail to build the multipart package given its source
components).

Can you open a bug report on jira.codehaus.org? If you don't have an
account, register on xircles.codehaus.org

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Created Bug Report: http://jira.codehaus.org/browse/GEOS-5780

Elridge D'Mello
Developer, DrilingInfo

On 04/18/2013 12:12 PM, Andrea Aime wrote:

On Thu, Apr 18, 2013 at 6:30 PM, Elridge D'Mello <elridge.dmello@anonymised.com <mailto:elridge.dmello@anonymised.com>> wrote:

    We made a WCS GetCoverage request and got a multipart response
    back from GeoServer. The response contained a base64 encoded
    image (PNG format). We noticed that the base64 encoded image data
    that was sent back had extra characters at the very end, after the
    '=' character, which is a terminator for base64 encoding. The
    extra characters cause the image to not render in Chromium
    (version 24.0.1312.56), and FireFox (version 19.0). The extra
    characters in the response appear to be ignored in Safari and it
    is able to render the image. The characters after the last '='
    character appear to be a bug. For now we are working around the
    issue by stripping the extra characters in the client.

    Entire multipart response can be found here:
    http://nopaste.info/1b1589fc90.html
    The extra characters, 'AAAAAElFTkSuQmCC' are at the very end of
    the response.

    The GeoServer information is listed below:

    Version
    2.3-SNAPSHOT

    Git Revision
    33da7e570f18c23084d67702d921cab40cec1cde

    Build Date
    11-Apr-2013 03:40

    GeoTools Version
    9-SNAPSHOT (rev e757a66c6744d7f944db07a920b9f2632c0afde9)

    GeoWebCache Version
    1.4-SNAPSHOT (rev 2fc30e12be8678d10fe74d9b82faab1b0ab640de/2fc30e12be8678d10fe74d9b82faab1b0ab640de)

Hum... we use javamail to compose the mime/multipart message, not sure where the extra bits are coming from
(we just tell javamail to build the multipart package given its source components).

Can you open a bug report on jira.codehaus.org <http://jira.codehaus.org>? If you don't have an account, register on xircles.codehaus.org <http://xircles.codehaus.org>

Cheers
Andrea
--

GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it/&gt; for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------