More changes
This commit is contained in:
parent
616f1e64c6
commit
2e67e9ed4a
BIN
Debug/main.cpp.o
BIN
Debug/main.cpp.o
Binary file not shown.
@ -9,7 +9,8 @@ Debug/main.cpp.o: main.cpp ../ServerCore/includes ../ServerCore/EPoll.h \
|
||||
../ServerCore/Exception.h ../ServerCore/File.h ../ServerCore/Log.h \
|
||||
../ServerCore/IPAddress.h HTTPService.h ../ServerCore/Service.h \
|
||||
HTTPSessions.h ../ServerCore/Header.h ../ServerCore/Response.h \
|
||||
PageService.h HTTPHandler.h ../ServerCore/Command.h \
|
||||
PageList.h ../ServerCore/CommandList.h __index.h __setupadmin.h \
|
||||
__favicon_ico.h HTTPHandler.h ../ServerCore/Command.h \
|
||||
../ServerCore/Session.h
|
||||
|
||||
../ServerCore/includes:
|
||||
@ -66,7 +67,15 @@ HTTPSessions.h:
|
||||
|
||||
../ServerCore/Response.h:
|
||||
|
||||
PageService.h:
|
||||
PageList.h:
|
||||
|
||||
../ServerCore/CommandList.h:
|
||||
|
||||
__index.h:
|
||||
|
||||
__setupadmin.h:
|
||||
|
||||
__favicon_ico.h:
|
||||
|
||||
HTTPHandler.h:
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace http {
|
||||
|
||||
core::Log(core::LOG_DEBUG_1) << "Request: " << request;
|
||||
|
||||
// HTTPSession *httpSession = ((HTTPService &)session->service).httpSessions.findSessionByHeader(header, response);
|
||||
HTTPSession *httpSession = ((HTTPService &)session->service).httpSessions.findSessionByHeader(header, response);
|
||||
|
||||
std::stringstream content;
|
||||
if(((HTTPService &)session->service).pageList.processRequest(header.getPath() + " ", session, content)) {
|
||||
@ -31,8 +31,6 @@ namespace http {
|
||||
data << response.getResponse(content.str());
|
||||
}
|
||||
|
||||
core::Log(core::LOG_DEBUG_1) << "==========Request completed.";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5,16 +5,16 @@
|
||||
## Debug
|
||||
ProjectName :=HTTPServer
|
||||
ConfigurationName :=Debug
|
||||
WorkspacePath :=/home/barant
|
||||
ProjectPath :=/home/barant/barant/HTTPServer
|
||||
WorkspacePath :=/home/bradarant/barant
|
||||
ProjectPath :=/home/bradarant/barant/HTTPServer
|
||||
IntermediateDirectory :=./Debug
|
||||
OutDir := $(IntermediateDirectory)
|
||||
CurrentFileName :=
|
||||
CurrentFilePath :=
|
||||
CurrentFileFullPath :=
|
||||
User :=root
|
||||
Date :=05/30/19
|
||||
CodeLitePath :=/home/barant/.codelite
|
||||
User :=Brad Arant
|
||||
Date :=31/05/19
|
||||
CodeLitePath :=/home/bradarant/.codelite
|
||||
LinkerName :=/usr/bin/x86_64-linux-gnu-g++
|
||||
SharedObjectLinkerName :=/usr/bin/x86_64-linux-gnu-g++ -shared -fPIC
|
||||
ObjectSuffix :=.o
|
||||
@ -92,7 +92,7 @@ PreBuild:
|
||||
## Objects
|
||||
##
|
||||
$(IntermediateDirectory)/main.cpp$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main.cpp$(DependSuffix)
|
||||
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/barant/barant/HTTPServer/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath)
|
||||
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/HTTPServer/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath)
|
||||
$(IntermediateDirectory)/main.cpp$(DependSuffix): main.cpp
|
||||
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/main.cpp$(DependSuffix) -MM main.cpp
|
||||
|
||||
@ -100,7 +100,7 @@ $(IntermediateDirectory)/main.cpp$(PreprocessSuffix): main.cpp
|
||||
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main.cpp$(PreprocessSuffix) main.cpp
|
||||
|
||||
$(IntermediateDirectory)/HTTPSession.cpp$(ObjectSuffix): HTTPSession.cpp $(IntermediateDirectory)/HTTPSession.cpp$(DependSuffix)
|
||||
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/barant/barant/HTTPServer/HTTPSession.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/HTTPSession.cpp$(ObjectSuffix) $(IncludePath)
|
||||
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/HTTPServer/HTTPSession.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/HTTPSession.cpp$(ObjectSuffix) $(IncludePath)
|
||||
$(IntermediateDirectory)/HTTPSession.cpp$(DependSuffix): HTTPSession.cpp
|
||||
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/HTTPSession.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/HTTPSession.cpp$(DependSuffix) -MM HTTPSession.cpp
|
||||
|
||||
@ -108,7 +108,7 @@ $(IntermediateDirectory)/HTTPSession.cpp$(PreprocessSuffix): HTTPSession.cpp
|
||||
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/HTTPSession.cpp$(PreprocessSuffix) HTTPSession.cpp
|
||||
|
||||
$(IntermediateDirectory)/HTTPSessions.cpp$(ObjectSuffix): HTTPSessions.cpp $(IntermediateDirectory)/HTTPSessions.cpp$(DependSuffix)
|
||||
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/barant/barant/HTTPServer/HTTPSessions.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/HTTPSessions.cpp$(ObjectSuffix) $(IncludePath)
|
||||
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/HTTPServer/HTTPSessions.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/HTTPSessions.cpp$(ObjectSuffix) $(IncludePath)
|
||||
$(IntermediateDirectory)/HTTPSessions.cpp$(DependSuffix): HTTPSessions.cpp
|
||||
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/HTTPSessions.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/HTTPSessions.cpp$(DependSuffix) -MM HTTPSessions.cpp
|
||||
|
||||
@ -116,7 +116,7 @@ $(IntermediateDirectory)/HTTPSessions.cpp$(PreprocessSuffix): HTTPSessions.cpp
|
||||
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/HTTPSessions.cpp$(PreprocessSuffix) HTTPSessions.cpp
|
||||
|
||||
$(IntermediateDirectory)/HTTPHandler.cpp$(ObjectSuffix): HTTPHandler.cpp $(IntermediateDirectory)/HTTPHandler.cpp$(DependSuffix)
|
||||
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/barant/barant/HTTPServer/HTTPHandler.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/HTTPHandler.cpp$(ObjectSuffix) $(IncludePath)
|
||||
$(CXX) $(IncludePCH) $(SourceSwitch) "/home/bradarant/barant/HTTPServer/HTTPHandler.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/HTTPHandler.cpp$(ObjectSuffix) $(IncludePath)
|
||||
$(IntermediateDirectory)/HTTPHandler.cpp$(DependSuffix): HTTPHandler.cpp
|
||||
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/HTTPHandler.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/HTTPHandler.cpp$(DependSuffix) -MM HTTPHandler.cpp
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "CommandList.h"
|
||||
#include "__index.h"
|
||||
#include "__setupadmin.h"
|
||||
#include "__favicon_ico.h"
|
||||
|
||||
namespace http {
|
||||
|
||||
@ -13,11 +14,13 @@ namespace http {
|
||||
PageList() {
|
||||
add(index, "/ ");
|
||||
add(setupadmin, "/setupadmin ");
|
||||
add(favicon_ico, "/favicon.ico");
|
||||
}
|
||||
|
||||
private:
|
||||
__index index;
|
||||
__setupadmin setupadmin;
|
||||
__favicon_ico favicon_ico;
|
||||
|
||||
};
|
||||
|
||||
|
@ -7,7 +7,7 @@ namespace http {
|
||||
|
||||
int processCommand(std::string request, core::Session *session, std::stringstream &data) override {
|
||||
|
||||
data << header_data;
|
||||
data << std::string(header_data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user