00001 // -*- C++ -*- 00002 // 00003 // $Id: HTTP_Request.inl 90450 2010-06-08 07:25:58Z mcorino $ 00004 00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00006 00007 namespace ACE 00008 { 00009 namespace HTTP 00010 { 00011 00012 ACE_INLINE 00013 void Request::reset () 00014 { 00015 this->clear (); 00016 this->set_version (HTTP_1_0); 00017 this->method_ = HTTP_GET; 00018 this->uri_ = "/"; 00019 } 00020 00021 ACE_INLINE 00022 void Request::reset (const ACE_CString& version) 00023 { 00024 this->clear (); 00025 this->set_version (version); 00026 this->method_ = HTTP_GET; 00027 this->uri_ = "/"; 00028 } 00029 00030 ACE_INLINE 00031 void Request::reset (const ACE_CString& method, const ACE_CString& uri) 00032 { 00033 this->clear (); 00034 this->set_version (HTTP_1_0); 00035 this->method_ = method; 00036 this->uri_ = uri; 00037 } 00038 00039 ACE_INLINE 00040 void Request::reset (const ACE_CString& method, const ACE_CString& uri, const ACE_CString& version) 00041 { 00042 this->clear (); 00043 this->set_version (version); 00044 this->method_ = method; 00045 this->uri_ = uri; 00046 } 00047 00048 ACE_INLINE 00049 void Request::set_method(const ACE_CString& method) 00050 { 00051 this->method_ = method; 00052 } 00053 00054 ACE_INLINE 00055 const ACE_CString& Request::get_method() const 00056 { 00057 return this->method_; 00058 } 00059 00060 ACE_INLINE 00061 void Request::set_URI(const ACE_CString& uri) 00062 { 00063 this->uri_ = uri; 00064 } 00065 00066 ACE_INLINE 00067 const ACE_CString& Request::get_URI() const 00068 { 00069 return this->uri_; 00070 } 00071 00072 ACE_INLINE 00073 void Request::set_host(const ACE_CString& host) 00074 { 00075 this->set (HOST, host); 00076 } 00077 00078 ACE_INLINE 00079 bool Request::has_host () const 00080 { 00081 return this->has (HOST); 00082 } 00083 00084 ACE_INLINE 00085 ACE_CString Request::get_host() const 00086 { 00087 ACE_CString val; 00088 this->get (HOST, val); 00089 return val; 00090 } 00091 00092 ACE_INLINE 00093 bool Request::has_credentials() const 00094 { 00095 return this->has (AUTHORIZATION); 00096 } 00097 00098 } 00099 } 00100 00101 ACE_END_VERSIONED_NAMESPACE_DECL