[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[THREDDS #JQR-339682]: OPENDAP - HTTP 400 Error



Greetings Geoffrey,

No worries - ideally all of this would be transparent. There was 
a recent change to the Tomcat servlet container in which it started 
rejecting unsafe characters by default, and so things that used to 
work no longer work :-(

As a heads-up, most all OPeNDAP severs deal with the percent encoded
parameters without issue, but not all do. For example, the Ingrid 
server at Columbia (http://iridl.ldeo.columbia.edu) does not handle 
the percent encoded characters, and will fail. The strategy we use 
in netCDF-Java is to percent encode by default, but allow the user 
the option to not encode in case like this.

Cheers,

Sean

> Hi Sean,
> 
> Yes I can switch over my links to thredds-jumbo. I apologize for not
> looking into that myself with escaping the square brackets. I had started
> on a project to utilize the opendap access last year and was finally able
> to get some time to come back to it, so perhaps my saved links worked last
> year but now with any changes that might have happened in the interim with
> the servers or pydap might have changed. Thank you for letting me know so
> quickly and pointing me to the reasoning behind it. I should be able to do
> deal with the descrepancy in pydap now in my code without having to worry
> as much about the server. Thanks again!
> 
> Kind regards,
> 
> Geoffrey Baum
> 
> address@hidden> wrote:
> 
> > Greetings Geoffrey!
> >
> > This is an issue with the way the server is configured. In the case of
> > thredds-jetstream, any url requested with square brackets must have those
> > characters escaped. For example:
> >
> > [ -> %5B
> > ] -> %5D
> >
> > So, this URL will fail with a 400:
> >
> >
> > http://thredds-jetstream.unidata.ucar.edu/thredds/dodsC/grib/NCEP/GFS/Global_0p25deg_ana/GFS_Global_0p25deg_ana_20190125_1800.grib2.ascii?lat[0:1:720]
> >
> > but this URL will work:
> >
> >
> > http://thredds-jetstream.unidata.ucar.edu/thredds/dodsC/grib/NCEP/GFS/Global_0p25deg_ana/GFS_Global_0p25deg_ana_20190125_1800.grib2.ascii?%3Flat%5B0%3A1%3A720%5D
> >
> > The specific way thredds.ucar.edu and thredds-jumbo.unidata.ucar.edu are
> > configured allows the square brackets through without issue. Technically,
> > the square brackets should always be escaped. Many, but not all, OPeNDAP
> > clients escape URLs before making the request, but not all. It looks like
> > pydap is one that does not. In fact, prior to 4.6.12 (one version ahead of
> > thredds-jetstream), the opendap access webpage did not escape the square
> > brackets, which would cause a 400 even in the web browser.
> >
> > For now, can you use thredds or thredds-jumbo instead of thredds-jetstream?
> >
> > Sean
> >
> > > Can you post an example URL using thredds-jetstream for me to
> > investigate?
> > >
> > > > On second thought perhaps I was not using the correct server,
> > thredds-jumbo
> > > > seems to work fine while thredds-jetstream is still giving me fits.
> > > >
> > > > address@hidden> wrote:
> > > >
> > > > > First, see if the data is accessible thru your web browser.
> > > > > Take the URL and add .dds to the end of the path (but before any
> > ?....).
> > > > > e.g. http://x.y/a/b/c -> http://x.y/a/b/c.dds
> > > > > Stick this into your browser and see what you get.s
> > > > >
> > > > > >
> > > > > > I was writing to check to see if there were any issues regarding
> > the
> > > > > > OPENDAP access for the model data housed on Thredds Server. It
> > seems that
> > > > > > if I try to access the data either through the Access Form on the
> > server
> > > > > or
> > > > > > via a request from some python code (utilizing PyDAP) that I get
> > an HTTP
> > > > > > 400 Error returned. The data is obviously available as I can see
> > it is
> > > > > > there by looking at WMS link and downloading the grib file
> > directly from
> > > > > > the server so I just wanted to write to check to see if access via
> > > > > OPENDAP
> > > > > > has been removed or if there is another Error going on. I
> > attempted to
> > > > > > access the  RAP, GFS, HRRR and NAM models with the same experience
> > with
> > > > > > each. Thanks in advance for any insight or help you can provide.
> > > > > >
> > > > > > Kind Regards,
> > > > > >
> > > > > > Geoffrey Baum
> > > > > >
> > > > > >
> > > > >
> > > > > =Dennis Heimbigner
> > > > >   Unidata
> > > > >
> > > > >
> > > > > Ticket Details
> > > > > ===================
> > > > > Ticket ID: JQR-339682
> > > > > Department: Support THREDDS
> > > > > Priority: Normal
> > > > > Status: Open
> > > > > ===================
> > > > > NOTE: All email exchanges with Unidata User Support are recorded in
> > the
> > > > > Unidata inquiry tracking system and then made publicly available
> > through
> > > > > the web.  If you do not want to have your interactions made
> > available in
> > > > > this way, you must let us know in each email you send to us.
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > > =Dennis Heimbigner
> > > Unidata
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: JQR-339682
> > Department: Support THREDDS
> > Priority: Normal
> > Status: Open
> > ===================
> > NOTE: All email exchanges with Unidata User Support are recorded in the
> > Unidata inquiry tracking system and then made publicly available through
> > the web.  If you do not want to have your interactions made available in
> > this way, you must let us know in each email you send to us.
> >
> >
> >
> 
> 


Ticket Details
===================
Ticket ID: JQR-339682
Department: Support THREDDS
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.



NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.