summaryrefslogtreecommitdiff
path: root/src/modules/httpd.h
diff options
context:
space:
mode:
authorpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-11 11:35:23 +0000
committerpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-11 11:35:23 +0000
commitd185decae97752368d5cf62311cbc0d1a52aa22c (patch)
tree754e7076778fabfbaacaef96da0f845110a8adef /src/modules/httpd.h
parent62ac378bfb9591f5c5e10076c8be73adaabcfc64 (diff)
fixed some indentation and spacing in modules
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9888 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/httpd.h')
-rw-r--r--src/modules/httpd.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/httpd.h b/src/modules/httpd.h
index 0fa5c09d5..2d8da2cbd 100644
--- a/src/modules/httpd.h
+++ b/src/modules/httpd.h
@@ -27,7 +27,7 @@ class HTTPHeaders : public classbase
protected:
std::map<std::string,std::string> headers;
public:
-
+
/** Set the value of a header
* Sets the value of the named header. If the header is already present, it will be replaced
*/
@@ -35,7 +35,7 @@ class HTTPHeaders : public classbase
{
headers[name] = data;
}
-
+
/** Set the value of a header, only if it doesn't exist already
* Sets the value of the named header. If the header is already present, it will NOT be updated
*/
@@ -44,21 +44,21 @@ class HTTPHeaders : public classbase
if (!IsSet(name))
SetHeader(name, data);
}
-
+
/** Remove the named header
*/
void RemoveHeader(const std::string &name)
{
headers.erase(name);
}
-
+
/** Remove all headers
*/
void Clear()
{
headers.clear();
}
-
+
/** Get the value of a header
* @return The value of the header, or an empty string
*/
@@ -67,10 +67,10 @@ class HTTPHeaders : public classbase
std::map<std::string,std::string>::iterator it = headers.find(name);
if (it == headers.end())
return std::string();
-
+
return it->second;
}
-
+
/** Check if the given header is specified
* @return true if the header is specified
*/
@@ -79,17 +79,17 @@ class HTTPHeaders : public classbase
std::map<std::string,std::string>::iterator it = headers.find(name);
return (it != headers.end());
}
-
+
/** Get all headers, formatted by the HTTP protocol
* @return Returns all headers, formatted according to the HTTP protocol. There is no request terminator at the end
*/
std::string GetFormattedHeaders()
{
std::string re;
-
+
for (std::map<std::string,std::string>::iterator i = headers.begin(); i != headers.end(); i++)
re += i->first + ": " + i->second + "\r\n";
-
+
return re;
}
};
@@ -105,7 +105,7 @@ class HTTPRequest : public classbase
std::string document;
std::string ipaddr;
std::string postdata;
-
+
public:
HTTPHeaders *headers;
@@ -181,7 +181,7 @@ class HTTPDocument : public classbase
public:
HTTPHeaders headers;
-
+
/** The socket pointer from an earlier HTTPRequest
*/
void* sock;