<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hi Jukka,</p>
    <p><span lang="EN-US">Accept-Encoding: gzip is actually sent by
        default as you can see with "ogrinfo
OAPIF:<a class="moz-txt-link-rfc2396E" href="https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/collections/building/">"https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/collections/building/"</a>
        --debug on --config CPL_CURL_VERBOSE YES", and the server honors
        it:<br>
      </span></p>
    <p><span lang="EN-US">[...]</span></p>
    <p><span lang="EN-US">> GET
/inspire-buildings/features/v1/collections/building/items?f=json&limit=10
        HTTP/1.1<br>
        Host: beta-paikkatieto.maanmittauslaitos.fi<br>
        Accept-Encoding: gzip<br>
        Accept: application/geo+json, application/json<br>
        <br>
        < HTTP/1.1 200 OK<br>
        [...]<br>
        < Content-Encoding: gzip<br>
        < Content-Type: application/geo+json<br>
      </span></p>
    <p><span lang="EN-US">Curl automatically uncompress the data, so
        this is transparent for GDAL.</span></p>
    <p><span lang="EN-US">The debug trace "</span><span lang="EN-US">HTTP:
        These HTTP headers were set" is a bit misleading as it only
        displays the HEADERS option sent to CPLHttpFetch(), but not the
        content of what is specified with the </span><span lang="EN-US">GDAL_HTTP_HEADER_FILE
        config option. Enabling Curl traces with CPL_CURL_VERBOSE=YES is
        the ultimate way of seeing what is really sent to the server.</span></p>
    <p><span lang="EN-US">Even</span><br>
      <span lang="EN-US"></span></p>
    <p><span lang="EN-US"><br>
      </span></p>
    <div class="moz-cite-prefix">Le 23/03/2021 à 13:21, Rahkonen Jukka
      (MML) a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:4abc7d393b6347e48d1b6da6a517e420@maanmittauslaitos.fi">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <div class="WordSection1">
        <p class="MsoNormal">Hi,</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal"><span lang="EN-US">Is it possible to ask
            the OAPIF server to send response as gzipped, and if it
            succeeds, would GDAL know what to do with the response? I
            made a try by saving a line “Accept-Encoding: gzip" as a
            test file and then making this request:</span></p>
        <p class="MsoNormal"><span lang="EN-US"> </span></p>
        <p class="MsoNormal"><span lang="EN-US">ogrinfo
OAPIF:<a class="moz-txt-link-rfc2396E" href="https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/collections/building/">"https://beta-paikkatieto.maanmittauslaitos.fi/inspire-buildings/features/v1/collections/building/"</a>
            --config GDAL_HTTP_HEADER_FILE headers.txt --debug on
            --config cpl_debug on</span></p>
        <p class="MsoNormal"><span lang="EN-US"> </span></p>
        <p class="MsoNormal"><span lang="EN-US">Unfortunately it seems
            that Accept-Encoding header was not added:</span></p>
        <p class="MsoNormal"><span lang="EN-US">HTTP: These HTTP headers
            were set: Accept: application/geo+json, application/json</span></p>
        <p class="MsoNormal"><span lang="EN-US"> </span></p>
        <p class="MsoNormal"><span lang="EN-US">Is there some trick to
            make this to work or would it require changes into the OAPIF
            driver?</span></p>
        <p class="MsoNormal"><span lang="EN-US"> </span></p>
        <p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-</span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>