Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

NCSS Response does not include subset file size in header (TDS 5.0.0) #849

Open
bonnland opened this issue Jun 2, 2017 · 0 comments
Open

Comments

@bonnland
Copy link

bonnland commented Jun 2, 2017

Hi, the ESG catalog is currently based on TDS 5.0.0-snapshot.

We're hoping to capture successful downloads from our Tomcat logs for NetCDF subset requests. It currently looks like the expected size of the downloaded file is not being included in the response header, so the Tomcat log does not include enough information to know whether the client received the entire file. Example:

curl -v -o florida.nc https://tds.ucar.edu/thredds/ncss/grid/glade/p/vetssg/data/cordex/data/raw/NAM-22i/day/CanRCM4/CanESM2/hist/pr/pr.hist.CanESM2.CanRCM4.day.NAM-22i.raw.nc?var=pr&north=31.500&west=-88.000&east=-77.000&south=25.000&horizStride=1&time_start=1950-01-01T12%3A00%3A00Z&time_end=2005-12-31T12%3A00%3A00Z&timeStride=1&vertCoord=&addLatLon=true&accept=netcdf3

...

GET /thredds/ncss/grid/glade/p/vetssg/data/cordex/data/raw/NAM-22i/day/CanRCM4/CanESM2/hist/pr/pr.hist.CanESM2.CanRCM4.day.NAM-22i.raw.nc?var=pr HTTP/1.1
Host: tds.ucar.edu
User-Agent: curl/7.49.0
Accept: /

{ [5 bytes data]
< HTTP/1.1 200 200
< Date: Wed, 31 May 2017 20:18:47 GMT
< Server: Apache
< Content-Disposition: attachment; filename=pr.hist.CanESM2.CanRCM4.day.NAM-22i.raw.nc
< Content-Type: application/x-netcdf
< Transfer-Encoding: chunked
<
{ [5 bytes data]
100 616k 0 616k 0 0 5522k 0 --:--:-- --:--:-- --:--:-- 5658k

  • Connection #0 to host tds.ucar.edu left intact

The resulting file size was 631560 bytes.

The tomcat log shows that 631560 bytes were sent, but it shows nothing for the expected size. I believe this is because the content length is not included in the response header.

If the content length could be included in the response header, we could calculate byte savings from the request, which would be valuable for our stakeholders.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant