From d3ea2ff01c51df0df95cd23157267048e2c2fdcd Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Fri, 7 Nov 2003 14:42:05 +0000 Subject: [PATCH] Se arreglan detalles, ya compila pero se cuelga cuando se conecta un cliente. --- Constructor/Makefile | 2 +- Server/include/plaqui/server/httpmessage.h | 2 ++ Server/src/controlserver.cpp | 16 ++++++++-------- Server/src/httpheaders.cpp | 2 +- Server/src/httpmessage.cpp | 2 +- Server/src/httprequest.cpp | 2 +- Server/src/httpresponse.cpp | 2 +- Server/src/string.cpp | 4 ++-- docs/cliente_servidor.dia | Bin 2851 -> 2648 bytes 9 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Constructor/Makefile b/Constructor/Makefile index 4347391..67d9350 100644 --- a/Constructor/Makefile +++ b/Constructor/Makefile @@ -3,7 +3,7 @@ # $Id$ # -CXXFLAGS=-Wall -g `pkg-config --cflags libglademm-2.0` +CXXFLAGS=-Wall -O2 `pkg-config --cflags libglademm-2.0` LDFLAGS=`pkg-config --libs libglademm-2.0` TARGETS=main diff --git a/Server/include/plaqui/server/httpmessage.h b/Server/include/plaqui/server/httpmessage.h index 33f546f..b188e19 100644 --- a/Server/include/plaqui/server/httpmessage.h +++ b/Server/include/plaqui/server/httpmessage.h @@ -50,6 +50,8 @@ namespace Server { /// Version HTTP. std::string version; + public: + /// Cabeceras HTTP. HTTPHeaders headers; diff --git a/Server/src/controlserver.cpp b/Server/src/controlserver.cpp index 348d772..144d236 100644 --- a/Server/src/controlserver.cpp +++ b/Server/src/controlserver.cpp @@ -56,7 +56,7 @@ void ControlServer::real_run(void) { #ifdef DEBUG cerr << __FILE__ << ": real_run()" << endl; #endif // DEBUG - char buf[BUFSIZ]; + //char buf[BUFSIZ]; while (!stop) { HTTPRequest request; socket >> request; @@ -99,11 +99,11 @@ void ControlServer::real_run(void) { // Command command = parse_command(request.uri); //signal_command_received().emit(command); #ifdef DEBUG - cerr << "Request: " << endl; - for (Request::const_iterator i = request.begin(); i != request.end(); - i++) { - cerr << " " << i->first << ": " << i->second << endl; - } + cerr << "Request: " << request << endl; + //for (HTTPRequest::const_iterator i = request.begin(); + // i != request.end(); i++) { + // cerr << " " << i->first << ": " << i->second << endl; + //} #endif // DEBUG // FIXME - hacer respuesta XML. // La respuesta hay que mandarla asincrónicamente porque no puedo @@ -127,8 +127,8 @@ Accept-Ranges: bytes response_xml << "

versión 0.2

" << endl; response_xml << "

Pedido HTTP

" << endl; response_xml << "