#include "config.h"
#include <cstring>
#include <cstdio>
#include <ctype.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/wait.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include "cgi_util.h"
#include "util.h"
#include "debug.h"
Include dependency graph for cgi_util.cc:
Go to the source code of this file.
Namespaces | |
namespace | libdap |
Defines | |
#define | CRLF "\r\n" |
#define | FILE_DELIMITER '/' |
Functions | |
bool | libdap::found_override (string name, string &doc) |
string | libdap::get_user_supplied_docs (string name, string cgi) |
Look for the user supplied CGI- and dataset-specific HTML* documents. | |
bool | libdap::remove_mime_header (FILE *in) |
Read and discard the MIME header of the stream in . | |
CGI Utilities | |
A collection of useful functions for writing OPeNDAP servers. The CGI utilities include a variety of functions useful to programmers developing OPeNDAP CGI filter programs. However, before jumping in and using these, look at the class DODSFilter. Always choose to use that class over these functions if you can.
| |
bool | libdap::do_version (const string &script_ver, const string &dataset_ver) |
Send a version number. | |
void | libdap::ErrMsgT (const string &Msgt) |
Logs an error message. | |
string | libdap::find_ancillary_file (const string &pathname, const string &ext, const string &dir, const string &file) |
Find a file with ancillary data. | |
string | libdap::find_group_ancillary_file (const string &name, const string &ext) |
time_t | libdap::last_modified_time (const string &name) |
string | libdap::name_path (const string &path) |
Returns the filename portion of a pathname. | |
string | libdap::rfc822_date (const time_t t) |
MIME utility functions | |
These functions are used to create the MIME headers for a message from a server to a client. They are public but should not be called directly unless absolutely necessary. Use DODSFilter instead. NB: These functions actually write both the response status line and the header.
| |
void | libdap::set_mime_binary (ostream &strm, ObjectType type, const string &ver, EncodingType enc, const time_t last_modified) |
void | libdap::set_mime_binary (FILE *out, ObjectType type, const string &ver, EncodingType enc, const time_t last_modified) |
void | libdap::set_mime_error (ostream &strm, int code, const string &reason, const string &version) |
void | libdap::set_mime_error (FILE *out, int code, const string &reason, const string &version) |
void | libdap::set_mime_html (ostream &strm, ObjectType type, const string &ver, EncodingType enc, const time_t last_modified) |
void | libdap::set_mime_html (FILE *out, ObjectType type, const string &ver, EncodingType enc, const time_t last_modified) |
void | libdap::set_mime_not_modified (ostream &strm) |
Send a `Not Modified' response. | |
void | libdap::set_mime_not_modified (FILE *out) |
Send a `Not Modified' response. | |
void | libdap::set_mime_text (ostream &strm, ObjectType type, const string &ver, EncodingType enc, const time_t last_modified) |
void | libdap::set_mime_text (FILE *out, ObjectType type, const string &ver, EncodingType enc, const time_t last_modified) |
#define CRLF "\r\n" |
Definition at line 85 of file cgi_util.cc.
Referenced by libdap::do_version(), libdap::remove_mime_header(), libdap::set_mime_binary(), libdap::set_mime_error(), libdap::set_mime_html(), libdap::set_mime_not_modified(), and libdap::set_mime_text().
#define FILE_DELIMITER '/' |