etf-validator / etf-webapp

:earth_africa: :mag: ETF is an open source testing framework for spatial data and services
https://www.etf-validator.net
European Union Public License 1.2
18 stars 19 forks source link

Attachments: handle gzip #115

Closed jonherrmann closed 2 years ago

jonherrmann commented 7 years ago

Currently gzip compressed attachments are saved as

<Attachment type="ServiceResponse" id="EID160f4a85-d9a5-4c92-8315-4b985737f2da">
<label>Service Response</label>
<encoding>UTF-8</encoding>
<mimeType>application/gzip</mimeType>
<referencedData href="http://etf/v2/TestTaskResults/EIDc1bd4e8e-28a5-4d50-b86a-2e0a5c45d3de/Attachments/EID160f4a85-d9a5-4c92-8315-4b985737f2da"/>
</Attachment>

and returned with response headers:

Content-Type: application/gzip
Content-Length: 2360

If the underlying base type is text, it should be saved as:

<Attachment type="ServiceResponse" id="EID160f4a85-d9a5-4c92-8315-4b985737f2da">
<label>Service Response</label>
<encoding>gzip</encoding>
<mimeType>text/html; charset=UTF-8</mimeType>
<referencedData href="http://etf/v2/TestTaskResults/EIDc1bd4e8e-28a5-4d50-b86a-2e0a5c45d3de/Attachments/EID160f4a85-d9a5-4c92-8315-4b985737f2da"/>
</Attachment>

with response headers:

Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
jonherrmann commented 2 years ago

Fixed in Version 2.1