Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

Thumbnail servlet not providing correct headers? #231

Open torrin47 opened 8 years ago

torrin47 commented 8 years ago

We're having difficulties with the built-in ThumbnailServlet: https://github.com/Esri/geoportal-server/blob/master/geoportal/src/com/esri/gpt/control/view/ThumbnailServlet.java Records with embedded binary thumbnails (created in ArcCatalog) like this: https://edg.epa.gov/metadata/rest/document?id=%7B9DB12AC9-97FD-4BCB-9661-EA640E88B2C0%7D Produce unintelligible output like this: https://edg.epa.gov/metadata/thumbnail?uuid=%7B9DB12AC9-97FD-4BCB-9661-EA640E88B2C0%7D ÿÿÿÿÿÿBMî76(È… Is there a reason why the Content-Disposition header is set to "attachment", rather than specifying a Content-Type? (Not sure what the MIME type of these ArcCatalog thumbnails is, but browsers seem to be interpreting the response as text/html rather than an image.) Can you provide any examples of the ThumbnailServlet working as intended? This may actually be the same issue experienced by Stephen (#227).

mhogeweg commented 7 years ago

we will ask the desktop team about the encoding used for the thumbnail

torrin47 commented 6 years ago

Haven't done a complete analysis on the differences between the records having problems above and this record, but wanted to include it as one that does appear to be working as intended - the embedded thumbnail is displayed correctly in the search results: https://edg.epa.gov/metadata/catalog/search/resource/details.page?uuid=%7B833BC924-2C92-489A-9E81-3C1990F507AE%7D Just another data point for analysis.