// -*- mode: c++; c-basic-offset:4 -*- // This file is part of libdap, A C++ implementation of the OPeNDAP Data // Access Protocol. // Copyright (c) 2002,2003 OPeNDAP, Inc. // Author: James Gallagher // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112. // (c) COPYRIGHT URI/MIT 1997-1999 // Please read the full copyright statement in the file COPYRIGHT_URI. // // Authors: // jhrg,jimg James Gallagher // Implementation of the DODSFilter class. This class is used to build dods // filter programs which, along with a CGI program, comprise OPeNDAP servers. // jhrg 8/26/97 #include "config.h" #include #ifndef WIN32 #include // for getopt #include #else #include #include #include #endif #include #include #include #include #include #include #ifdef HAVE_UUID_UUID_H #include // used to build CID header value for data ddx #elif defined(HAVE_UUID_H) #include #else #error "Could not find UUID library header" #endif #include #include "DAS.h" #include "DDS.h" #include "debug.h" #include "mime_util.h" #include "Ancillary.h" #include "util.h" #include "escaping.h" #include "DODSFilter.h" #include "XDRStreamMarshaller.h" #include "InternalErr.h" #ifndef WIN32 #include "SignalHandler.h" #include "EventHandler.h" #include "AlarmHandler.h" #endif #define CRLF "\r\n" // Change here, expr-test.cc and DODSFilter.cc using namespace std; namespace libdap { const string usage = "Usage: -o -u [options ...] [data set]\n\ \n\ options: -o : DAS, DDS, DataDDS, DDX, BLOB or Version (Required)\n\ -u : The complete URL minus the CE (required for DDX)\n\ -c: Compress the response using the deflate algorithm.\n\ -e : When returning a DataDDS, use as the constraint.\n\ -v : Use as the version number\n\ -d : Look for ancillary file in (deprecated).\n\ -f : Look for ancillary data in (deprecated).\n\ -r : Use as a cache directory\n\ -l