NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Luca Cinquini wrote:
On Sep 26, 2005, at 10:03 AM, John Caron wrote:Hi luca: you own another thank-you to julie, who forwarded your message!I keep making that mistake...Julie Caron wrote:---------- Forwarded message ---------- Date: Mon, 26 Sep 2005 09:11:23 -0600 From: Luca Cinquini <luca@xxxxxxxx> To: jcaron@xxxxxxxxCc: Michael Burek <mburek@xxxxxxxx>, John J.Allison <john@xxxxxxxxxxxxx> Subject: problem with newest netcdf java library when retrieving netcdf filefrom JOSS Hi John, after installing the newest NetCDF Java library on the CDP, there seems to be a problem in generating NcML on the fly when opening a URL that is served by the JOSS server, for example the following file: http://chinook.joss.ucar.edu:8080/datafile/nph-get/87.004/ RF01.20041207.161000_215115.PNI.nc Everything works ok if I place the same file on the dataportal server. The error when opening the file from the JOSS server is the following: java.io.IOException: Server does not support byte Ranges atucar.unidata.io.http.HTTPRandomAccessFile3.<init>(HTTPRandomAccessFile 3.java:74) atucar.unidata.io.http.HTTPRandomAccessFile3.<init>(HTTPRandomAccessFile 3.java:53) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:205) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:165) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:149) at ncar.scd.ncml.io.NetcdfReader.read(NetcdfReader.java:84) Which I think originates from the fact that appearently the JOSS server does NOT send, in its response, the header "Accept-Ranges". Now the question is: according to the WWW specification (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html), the "Accept-Ranges" header is optional: "Origin servers that accept byte-range requests MAY send Accept-Ranges: bytes but are not required to do so."the functionality (and so the header) is needed if you want to read a netcdf file over HTTP.Yes but the JOSS server does server the netCDF file correctly - I downloaded it to my personal laptop. The point is that, independently wether the remote server sends or not the Header "Accept-Ranges", the client application using the netcdf Java library MAY assume that the remote server will support bytes transfer - if this is not the case something else will break later on, but at least you won't loose all those servers that don't send this optional header.Or am I not interpreting the problem correctly ? thanks, Luca
ok, i see what you're saying. i didnt realize that servers werent required to have the header. I will modify to try it anyway.Still, I would ask JOSS to add the header, I think its more standard. Also, they are down so i havent verified that they do support range bytes.
netcdf-java
archives: