Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Serveur_web_pt2 Serveur_web_pt2_V2_avec_index_html Serveur_web_pt2_index_commenter Serveur_web_pt2_index_commenter
Fork of HTTPServer by
Revision 1:56636f5bf71a, committed 2010-06-14
- Comitter:
- donatien
- Date:
- Mon Jun 14 10:22:58 2010 +0000
- Parent:
- 0:52230c56755e
- Child:
- 2:356c7fa399ae
- Commit message:
Changed in this revision
Binary file LPC1768/HTTPServer.ar has changed
--- a/LPC1768/services/http/server/HTTPRequestDispatcher.h Fri Jun 11 16:26:10 2010 +0000 +++ b/LPC1768/services/http/server/HTTPRequestDispatcher.h Mon Jun 14 10:22:58 2010 +0000 @@ -60,7 +60,7 @@ void onTimeout(); //Connection has timed out - bool getRequest(string* rootPath, string* fullPath, string* meth); + bool getRequest(string* rootPath, string* subPath, string* meth); HTTPServer* m_pSvr; TCPSocket* m_pTCPSocket;
--- a/LPC1768/services/http/server/HTTPServer.h Fri Jun 11 16:26:10 2010 +0000 +++ b/LPC1768/services/http/server/HTTPServer.h Mon Jun 14 10:22:58 2010 +0000 @@ -60,7 +60,7 @@ }; //Including handlers here for more convenience -#include "impl/RpcHandler.h" +#include "impl/RPCHandler.h" #include "impl/FSHandler.h" #include "impl/SimpleHandler.h"
--- a/LPC1768/services/http/server/impl/FSHandler.h Fri Jun 11 16:26:10 2010 +0000
+++ b/LPC1768/services/http/server/impl/FSHandler.h Mon Jun 14 10:22:58 2010 +0000
@@ -27,11 +27,19 @@
#include "../HTTPRequestHandler.h"
#include "mbed.h"
+#include <map>
+using std::map;
+
+#include <string>
+using std::string;
+
class FSHandler : public HTTPRequestHandler
{
public:
FSHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket);
virtual ~FSHandler();
+
+ static void mount(const string& fsPath, const string& rootPath);
//protected:
static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { return new FSHandler(rootPath, path, pTCPSocket); } //if we ever could do static virtual functions, this would be one
@@ -47,6 +55,7 @@
private:
FILE* m_fp;
bool m_err404;
+ static map<string,string> m_lFsPath;
};
#endif
Binary file LPC2368/HTTPServer.ar has changed
--- a/LPC2368/services/http/server/HTTPRequestDispatcher.h Fri Jun 11 16:26:10 2010 +0000 +++ b/LPC2368/services/http/server/HTTPRequestDispatcher.h Mon Jun 14 10:22:58 2010 +0000 @@ -60,7 +60,7 @@ void onTimeout(); //Connection has timed out - bool getRequest(string* rootPath, string* fullPath, string* meth); + bool getRequest(string* rootPath, string* subPath, string* meth); HTTPServer* m_pSvr; TCPSocket* m_pTCPSocket;
--- a/LPC2368/services/http/server/HTTPServer.h Fri Jun 11 16:26:10 2010 +0000 +++ b/LPC2368/services/http/server/HTTPServer.h Mon Jun 14 10:22:58 2010 +0000 @@ -60,7 +60,7 @@ }; //Including handlers here for more convenience -#include "impl/RpcHandler.h" +#include "impl/RPCHandler.h" #include "impl/FSHandler.h" #include "impl/SimpleHandler.h"
--- a/LPC2368/services/http/server/impl/FSHandler.h Fri Jun 11 16:26:10 2010 +0000
+++ b/LPC2368/services/http/server/impl/FSHandler.h Mon Jun 14 10:22:58 2010 +0000
@@ -27,11 +27,19 @@
#include "../HTTPRequestHandler.h"
#include "mbed.h"
+#include <map>
+using std::map;
+
+#include <string>
+using std::string;
+
class FSHandler : public HTTPRequestHandler
{
public:
FSHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket);
virtual ~FSHandler();
+
+ static void mount(const string& fsPath, const string& rootPath);
//protected:
static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { return new FSHandler(rootPath, path, pTCPSocket); } //if we ever could do static virtual functions, this would be one
@@ -47,6 +55,7 @@
private:
FILE* m_fp;
bool m_err404;
+ static map<string,string> m_lFsPath;
};
#endif
