Advertisement
Guest User

Untitled

a guest
Oct 13th, 2014
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. commit f01ceed527defae2fdf499d0d071ce5590ad0910
  2. Author: muttley <[email protected]>
  3. Date: Mon Oct 13 11:49:02 2014 +0200
  4.  
  5. WebServer serves .json, .manifest and .appacache file
  6.  
  7. diff --git a/src/webserver/src/WebServer.cpp b/src/webserver/src/WebServer.cpp
  8. index 4226034..727d18a 100644
  9. --- a/src/webserver/src/WebServer.cpp
  10. +++ b/src/webserver/src/WebServer.cpp
  11. @@ -1915,6 +1915,13 @@ void CScriptWebServer::ProcessURL(ThreadData Data)
  12. || req_file.EndsWith(wxT(".xsl"))) {
  13. session->m_vars["content_type"] = "text/xml";
  14. httpOut = ProcessHtmlRequest(unicode2char(req_file), httpOutLen);
  15. + } else if ( req_file.EndsWith(wxT(".appcache"))
  16. + || req_file.EndsWith(wxT(".manifest"))) {
  17. + session->m_vars["content_type"] = "text/cache-manifest";
  18. + httpOut = ProcessHtmlRequest(unicode2char(req_file), httpOutLen);
  19. + } else if (req_file.EndsWith(wxT(".json"))) {
  20. + session->m_vars["content_type"] = "application/json";
  21. + httpOut = ProcessHtmlRequest(unicode2char(req_file), httpOutLen);
  22. } else {
  23. httpOut = GetErrorPage("aMuleweb doesn't handle the requested file type ", httpOutLen);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement