X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/bcbe297964b0ad7393385f1dd240448c340ed5ed..HEAD:/Server/include/plaqui/server/httprequest.h diff --git a/Server/include/plaqui/server/httprequest.h b/Server/include/plaqui/server/httprequest.h index 5056d15..7b43f67 100644 --- a/Server/include/plaqui/server/httprequest.h +++ b/Server/include/plaqui/server/httprequest.h @@ -30,6 +30,7 @@ #include "plaqui/server/httperror.h" #include "plaqui/server/httpmessage.h" +#include #include #include #include @@ -41,6 +42,7 @@ namespace Server { /// Pedido HTTP. class HTTPRequest: public HTTPMessage { + ///////////////////////////////////////////////////////////////////// // Constantes. protected: @@ -72,6 +74,7 @@ namespace Server { /// Caracteres no hexa para URIs (RFC 2396). static const std::string CHARS_HEX; + ///////////////////////////////////////////////////////////////////// // Tipos. public: @@ -79,6 +82,7 @@ namespace Server { /// Tipo de métodos HTTP reconocidos. typedef enum {GET, POST} HTTPMethod; + ///////////////////////////////////////////////////////////////////// // Atributos. protected: // TODO hacer privados con get() y set() ??? @@ -95,6 +99,7 @@ namespace Server { /// Query string. std::string query; + ///////////////////////////////////////////////////////////////////// // Métodos. public: @@ -122,13 +127,13 @@ namespace Server { * Obtiene los datos del pedido HTTP desde un texto. */ friend std::istream& operator>>(std::istream& is, HTTPRequest& req) - throw(HTTPError, std::ios::failure); + throw(HTTPError, sockerr, std::ios::failure); /** * Convierte el pedido HTTP en texto. */ friend std::ostream& operator<<(std::ostream& os, - const HTTPRequest& req); + const HTTPRequest& req) throw(sockerr); };