X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmessage.h;h=4d2310273f8b3fd0e4b0014aede99623028cd023;hb=1c965907682f4714db7b952915cf5b6bf9b7f4c1;hp=1ccc976ac71c76c3a8517e181a79ac2ab54f27c6;hpb=a4049d7c4126126ca3abd12b1aca8715e7006d44;p=libs%2Fnet.git diff --git a/source/message.h b/source/message.h index 1ccc976..4d23102 100644 --- a/source/message.h +++ b/source/message.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmsphttp -Copyright © 2008 Mikkosoft Productions, Mikko Rasa -Distributed under the LGPL -*/ - #ifndef MSP_HTTP_MESSAGE_H_ #define MSP_HTTP_MESSAGE_H_ @@ -33,16 +26,19 @@ public: virtual ~Message() { } void set_header(const std::string &, const std::string &); + bool has_header(const std::string &) const; const std::string &get_header(const std::string &) const; void add_content(const std::string &); const std::string &get_content() const { return content; } void set_user_data(const Variant &); const Variant &get_user_data() const { return user_data; } - bool get_complete() const { return complete; } + bool is_complete() const { return complete; } unsigned parse_content(const std::string &); - virtual std::string str() const =0; + virtual std::string str() const = 0; protected: + unsigned parse_headers(const std::string &); std::string str_common() const; + std::string normalize_header_name(const std::string &) const; }; } // namespace Http