All sorts of new crap and adjustments
This commit is contained in:
1 parent
5bd9e9ca21
commit
ff2c2b7432
84 files changed
+5935
-664
No files matched your search
+15
-23
@@ -1,41 +1,33 @@
|
||||
#include <string>
|
||||
#include "IMFRequest.h"
|
||||
#include "Exception.h"
|
||||
#include "Log.h"
|
||||
|
||||
namespace coreutils {
|
||||
|
||||
IMFRequest::IMFRequest() {}
|
||||
|
||||
IMFRequest::IMFRequest(PString &in) {
|
||||
coreutils::PString request = in.goeol();
|
||||
parts = request.split(" ");
|
||||
IMFRequest::IMFRequest(ZString &in) : IMFMessage(in) {
|
||||
setZString(in.goeol());
|
||||
this->split((char *)" ");
|
||||
}
|
||||
|
||||
void IMFRequest::parse(PString &in) {
|
||||
coreutils::PString request = in.goeol();
|
||||
parts = request.split(" ");
|
||||
}
|
||||
|
||||
std::string IMFRequest::getMethod() {
|
||||
if(parts.size() == 3)
|
||||
return parts[0].str();
|
||||
ZString IMFRequest::getMethod() {
|
||||
if(getList().size() == 3)
|
||||
return getList()[0];
|
||||
else
|
||||
return NULL;
|
||||
throw Exception("Error in parsing client request.");
|
||||
}
|
||||
|
||||
std::string IMFRequest::getURI() {
|
||||
if(parts.size() == 3)
|
||||
return parts[1].str();
|
||||
ZString IMFRequest::getURI() {
|
||||
if(getList().size() == 3)
|
||||
return getList()[1];
|
||||
else
|
||||
return NULL;
|
||||
throw Exception("Error in parsing client request.");
|
||||
}
|
||||
|
||||
std::string IMFRequest::getProtocol() {
|
||||
if(parts.size() == 3)
|
||||
return parts[2].str();
|
||||
ZString IMFRequest::getProtocol() {
|
||||
if(getList().size() == 3)
|
||||
return getList()[2];
|
||||
else
|
||||
return NULL;
|
||||
throw Exception("Error in parsing client request.");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user