Commit d3dc4e1e authored by jan.koester's avatar jan.koester
Browse files

add compare

parent 2d4661d8
Loading
Loading
Loading
Loading
+7 −0
Changes for src/http.cpp: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -102,6 +102,13 @@ void libhttppp::HttpUrl::clear(){
  _path="/";
}

bool libhttppp::HttpUrl::operator==(const HttpUrl& other) const {
        return (_protocol == other._protocol &&
                _host == other._host &&
                _port == other._port &&
                _path == other._path);
}

const std::string & libhttppp::HttpUrl::print(){
  std::stringstream ss;
  if(_protocol==HTTP){
+2 −0
Changes for src/http.h: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ namespace libhttppp {
     HttpUrl(const HttpUrl &src);
     ~HttpUrl();

     bool operator==(const HttpUrl& other) const;

     int getProtocol() const;
     const std::string &getHost() const;
     int getPort() const;