diff --git a/src/http.cpp b/src/http.cpp index 3e04c49..c2c8f5a 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -15,12 +15,12 @@ */ #include +#include #include #include "libravatarserv.hpp" using std::cout; using std::cerr; -using global::avatar_dir; using namespace http; const Request http::parse_request(const string &request) @@ -74,7 +74,7 @@ const string http::get_parameter(const string &request, const string ¶meter) std::size_t pos = request.find(parameter + "="); if (pos != std::string::npos) { - pos += parameter.length(); + pos += (1 + parameter.length()); return request.substr(pos, request.find('&', pos)); } diff --git a/src/libravatarserv.cpp b/src/libravatarserv.cpp index f6ef15b..2a5f007 100644 --- a/src/libravatarserv.cpp +++ b/src/libravatarserv.cpp @@ -15,7 +15,6 @@ */ #include -#include #include #include #include "version.hpp"