Opened 11 years ago

Last modified 11 years ago

#759 closed defect

WCPS encode behaviour dependent on capitalisation of format specifier — at Initial Version

Reported by: Marcus Sen Owned by: Piero Campalani
Priority: minor Milestone: 9.0.x
Component: petascope Version: development
Keywords: Cc: James Passmore
Complexity: Medium

Description

If I submit the query:

for c in (bgs_rs) return
encode(
        c.blue,
        "png"
        )

I get an image back with the response Content-Type header set to image/png

If I submit the query with "PNG" in capital letters I get the same image back but the response Content-Type header is set to text/plain. (Although with my browser Firefox it pops up a dialog box saying the data is application/octet-stream, presumably deciding that the Content-Type header must be wrong.)

I guess the behaviour should be the same for both or only lowercase or only uppercase versions should be allowed but I don't know where the format specifier strings are defined.

(Both queries get translated to the same underlying rasql query with capital letters:

select encode((c).blue, "PNG", "xmin=314158.77412577;xmax=574363.77412577;ymin=394361.64417978;ymax=632963.64417978;crs=EPSG:27700") from bgs_rs AS c where oid(c)=6145)

Dimitar Misev commented on rasdaman-users list:

Looks like a bug worth a ticket. The format → mimetype correspondence
is defined in the ps_format table.

Change History (0)

Note: See TracTickets for help on using tickets.