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

[Redux again: F-TDS URLs fail behind proxy with "bad URL extension" page...]



Hi John,

Turns out the problem is a known bug in mod_proxy (https://issues.apache.org/bugzilla/show_bug.cgi?id=43972) which does not properly encode a ";" when the URL is passed through even though it's encoded when it comes in. Even though it's fixed in the latest mod_proxy we can't count on servers having the latest code so I'm going to stop using ";" in my expressions. I finally figured it out by studying the TDS debug output. Thanks for that.

Nothing like a panicked email to a colleague to reveal the solution. Thanks. :-)

Roland
--- Begin Message ---
  • Subject: F-TDS URLs fail behind proxy with "bad URL extension" page...
  • Date: Tue, 20 May 2008 15:47:45 -0500
John,

We're pretty desperate for your help on a problem we're having with F-TDS. It's going to sound a little crazy, but I will try to explain the problem and a quick test you can run.

You won't need to run our IOSP code or set up Ferret because the issue manifests itself in the TDS code before any DataSource or IOSP attempts to handle the URL.

Simply put, F-TDS works when connecting directly to Tomcat, but fails when connecting to the same resource through an Apache proxy. When connecting via the proxy TDS rejects the URL as not having one of the recognized extensions. It's as if the Apache proxy munges the URL just enough that TDS gets confused. It's possible that these URLs violate some forty-eleven rules about how a URL should be constructed, but Tomcat likes them. :-)

To reproduce set up a TDS and proxy it via Apache. Suppose you did that on test.unidata.ucar.edu the set up and test would look like this:
e.g.
<Location /thredds>
  ProxyPass http://test.unidata.ucar.edu:8080/thredds
  ProxyPassReverse http://test.unidata.ucar.edu:8080/thredds
</Location>
<Proxy http://test.unidata.ucar.edu:8080/thredds>
  AllowOverride None
  Order allow,deny
  Allow from All
</Proxy>

The URL below that connects directly to your Tomcat will fail for you with some sort of "resource not found" error since you don't have the DataSource code, ISOP or the data. But it works on our system with the proper host and port number that connect directly to tomcat.
http://test.unidata.ucar.edu:8080/thredds/dodsC/las/coads_climatology_cdf/data_coads_climatology.jnl_expr_%7Bhttp%253A%252F%252Fporter.pmel.noaa.gov%253A8920%252Fthredds%252FdodsC%252Flas%252Flevitus_climatology_cdf%252Fdata_levitus_climatology.jnl%7D%7Blet+sst_1_regrid%3Dsst%5Bd%3D1%2Ct%3D%2215-Jul%22%3A%2215-Dec%22%40ave%5D%3Blet+temp_2_regrid%3Dtemp%5Bd%3D2%2Cgxy%3Dsst_1_regrid%5Bd%3D1%5D%5D%7D.html

The same URL accessed via the proxy (without the port number) will fail with a " The URL extension did not match" page which is a response from TDS long before the DataSource and IOSP get a chance to handle the URL.

Let me know if there is some other thing we can do to help figure this out.

Thanks,
Roland


--- End Message ---