diff options
Diffstat (limited to 'trunk/test/RequestToString.cc')
| -rw-r--r-- | trunk/test/RequestToString.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/trunk/test/RequestToString.cc b/trunk/test/RequestToString.cc new file mode 100644 index 00000000..c922c3be --- /dev/null +++ b/trunk/test/RequestToString.cc @@ -0,0 +1,27 @@ +#ifndef _D_REQUEST_TO_STRING_H_ +#define _D_REQUEST_TO_STRING_H_ +#include "Util.h" +#include "Request.h" +#include <string> + +using namespace std; + +class RequestToString { +private: + Request* req; +public: + + RequestToString(Request* req) { + this->req = req; + } + + string toString() { + return "url = "+req->url+"\n"+ + "protocol = "+req->protocol+"\n"+ + "host = "+req->host+"\n"+ + "port = "+Util::ulitos(req->port)+"\n"+ + "dir = "+req->dir+"\n"+ + "file = "+req->file; + } + +#endif // _D_REQUEST_TO_STRING_H_ |
