File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ namespace hobbit{
30
30
31
31
32
32
auto request = explode (request_line,' ' );
33
- if (request.size () < 7 ){
33
+ if (request.size () < 5 ){
34
34
throw std::invalid_argument (" Not enough parameters" );
35
35
// Not enough parameters
36
36
}
@@ -48,11 +48,13 @@ namespace hobbit{
48
48
49
49
std::string marshal () const noexcept
50
50
{
51
- std::string out = this ->proto + " " ;
52
- out += this ->version + " " ;
53
- out += this ->command + " " ;
51
+ std::string out = this ->proto ;
52
+ out += " " + this ->version ;
53
+ out += " " + this ->command ;
54
54
out += " " + std::to_string (this ->header .size ());
55
55
out += " " + std::to_string (this ->body .size ());
56
+ out += " \n " ;
57
+ out += this ->header + this ->body ;
56
58
return out;
57
59
}
58
60
};
You can’t perform that action at this time.
0 commit comments