BESUtil Class Reference

#include <BESUtil.h>

List of all members.

Static Public Member Functions

MIME utility functions
These functions are used to create the MIME headers for a message from a server to a client.

NB: These functions actually write both the response status line and the header.

See also:
DODSFilter


static void set_mime_text (ostream &strm)
 Generate an HTTP 1.0 response header for a text document.
static void set_mime_html (ostream &strm)
 Generate an HTTP 1.0 response header for a html document.
static string www2id (const string &in, const string &escape="%", const string &except="")
static string unhexstring (string s)
static string lowercase (const string &s)
static string unescape (const string &s)
static void check_path (const string &path, const string &root, bool follow_sym_links)
static char * fastpidconverter (char *buf, int base)
static char * fastpidconverter (long val, char *buf, int base)


Member Function Documentation

void BESUtil::set_mime_text ( ostream &  strm  )  [static]

Generate an HTTP 1.0 response header for a text document.

Parameters:
strm Write the MIME header to this ostream.

References CRLF.

Referenced by BESTextInfo::add_data(), and BESBasicHttpTransmitter::send_text().

void BESUtil::set_mime_html ( ostream &  strm  )  [static]

Generate an HTTP 1.0 response header for a html document.

Parameters:
strm Write the MIME header to this ostream.

References CRLF.

Referenced by BESHTMLInfo::add_data(), and BESBasicHttpTransmitter::send_html().

string BESUtil::www2id ( const string &  in,
const string &  escape = "%",
const string &  except = "" 
) [static]

This functions are used to unescape hex characters from strings

References unhexstring().

Here is the call graph for this function:

string BESUtil::unhexstring ( string  s  )  [static]

Referenced by www2id().

string BESUtil::lowercase ( const string &  s  )  [static]

string BESUtil::unescape ( const string &  s  )  [static]

Unescape characters with backslash before them

Referenced by BESDefineCommand::parse_request().

void BESUtil::check_path ( const string &  path,
const string &  root,
bool  follow_sym_links 
) [static]

Check if the specified path is valid

Check if the specified path is valid

Checks to see if the specified path is a valid path or not. The root directory specified is assumed to be valid, so we don't check that part of the path. The path parameter is relative to the root directory.

If follow_sym_links is false, then if any part of the specified path is a symbolic link, this function will return false, set the passed has_sym_link parameter. No error message is specified.

If there is a problem accessing the specified path then the error string will be filled with whatever system error message is provided.

param path path to check param root root directory path, assumed to be valid param follow_sym_links specifies whether allowed to follow symbolic links throws BESForbiddenError if the user is not allowed to traverse the path throws BESNotFoundError if there is a problem accessing the path or the path does not exist.

Referenced by BESContainerStorageVolatile::add_container(), and BESCatalogDirectory::show_catalog().

char * BESUtil::fastpidconverter ( char *  buf,
int  base 
) [static]

convert pid and place in provided buffer

Referenced by BESProcIdResponseHandler::execute(), fastpidconverter(), and BESDebug::GetPidStr().

char * BESUtil::fastpidconverter ( long  val,
char *  buf,
int  base 
) [static]

References fastpidconverter().

Here is the call graph for this function:


The documentation for this class was generated from the following files:

Generated on Thu Sep 11 07:59:03 2008 for OPeNDAP Back End Server (BES) by  doxygen 1.5.6