HTTPRequest.h
Go to the documentation of this file.
00001 /* 00002 * Copyright 2006-2009 Savarese Software Research Corporation 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * https://www.savarese.com/software/ApacheLicense-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00022 #ifndef __SSRC_WSPR_FCGI_HTTP_REQUEST_H 00023 #define __SSRC_WSPR_FCGI_HTTP_REQUEST_H 00024 00025 #include <string> 00026 00027 #include <ssrc/wispers-packages.h> 00028 00029 __BEGIN_NS_SSRC_WSPR_FCGI 00030 00031 using std::string; 00032 00033 enum HTTPRequestMethod { 00034 MethodDelete, 00035 MethodGet, 00036 MethodHead, 00037 MethodOptions, 00038 MethodPost, 00039 MethodPut, 00040 MethodTrace, 00041 MethodMax = MethodTrace, 00042 MethodUndefined 00043 }; 00044 00045 const unsigned int MethodNum = MethodMax + 1; 00046 00047 const char * const RequestMethodName[MethodNum] = { 00048 "DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT", "TRACE" 00049 }; 00050 00051 struct HTTPRequest { 00052 00053 virtual ~HTTPRequest() { } 00054 00055 virtual string auth_type() const = 0; 00056 virtual string content_type() const = 0; 00057 virtual long content_length() const = 0; 00058 virtual string document_root() const = 0; 00059 virtual string gateway_interface() const = 0; 00060 virtual string path_info() const = 0; 00061 virtual string path_translated() const = 0; 00062 virtual string query_string() const = 0; 00063 virtual string redirect_request() const = 0; 00064 virtual string redirect_query_string() const = 0; 00065 virtual string redirect_status() const = 0; 00066 virtual string redirect_url() const = 0; 00067 virtual string remote_address() const = 0; 00068 virtual string remote_host() const = 0; 00069 virtual string remote_ident() const = 0; 00070 virtual int remote_port() const = 0; 00071 virtual string remote_user() const = 0; 00072 virtual string remote_group() const = 0; 00073 virtual string request_method() const = 0; 00074 virtual HTTPRequestMethod http_request_method() const = 0; 00075 virtual string request_uri() const = 0; 00076 virtual string script_filename() const = 0; 00077 virtual string script_name() const = 0; 00078 virtual string server_address() const = 0; 00079 virtual string server_admin() const = 0; 00080 virtual string server_name() const = 0; 00081 virtual int server_port() const = 0; 00082 virtual string server_root() const = 0; 00083 virtual string server_protocol() const = 0; 00084 virtual string server_software() const = 0; 00085 00086 virtual bool https() const = 0; 00087 virtual string scheme() const = 0; 00088 00089 virtual string header_value(const string & header) const = 0; 00090 }; 00091 00092 __END_NS_SSRC_WSPR_FCGI 00093 00094 #endif
Copyright © 2006-2011 Savarese Software Research Corporation. All rights reserved.