mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 18:31:22 +02:00
add support for parsing javascript files (yjs)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@542 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -67,7 +67,7 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh) {
|
||||
log_level_printf(4, "mod_sendfile prepare hook start url:%s\n", hh->UrlData["fullurl"].c_str());
|
||||
std::string mime = sendfileTypes[hh->UrlData["fileext"]];
|
||||
if (((mime != "") || (hh->WebserverConfigList["mod_sendfile.sendAll"] == "true"))
|
||||
&& (hh->UrlData["fileext"] != "yhtm")) {
|
||||
&& !(hh->UrlData["fileext"] == "yhtm" || hh->UrlData["fileext"] == "yjs" || hh->UrlData["fileext"] == "ysh")) {
|
||||
//TODO: Check allowed directories / actually in GetFileName
|
||||
// build filename
|
||||
std::string fullfilename = GetFileName(hh, hh->UrlData["path"],
|
||||
|
@@ -81,7 +81,7 @@ THandleStatus CyParser::Hook_SendResponse(CyhookHandler *hh) {
|
||||
init(hh);
|
||||
|
||||
CyParser *yP = new CyParser(); // create a Session
|
||||
if (hh->UrlData["fileext"] == "yhtm") // yParser for yhtm-File
|
||||
if (hh->UrlData["fileext"] == "yhtm" || hh->UrlData["fileext"] == "yjs" || hh->UrlData["fileext"] == "ysh") // yParser for y*-Files
|
||||
yP->ParseAndSendFile(hh);
|
||||
else if (hh->UrlData["path"] == "/y/") // /y/<cgi> commands
|
||||
{
|
||||
@@ -246,7 +246,7 @@ void CyParser::ParseAndSendFile(CyhookHandler *hh) {
|
||||
yresult = cgi_cmd_parsing(hh, ycmd, ydebug); // parsing engine
|
||||
}
|
||||
// parsing given file
|
||||
yresult += cgi_file_parsing(hh, hh->UrlData["filename"], ydebug);
|
||||
yresult += cgi_file_parsing(hh, hh->UrlData["path"]+hh->UrlData["filename"], ydebug);
|
||||
if (yresult.length() <= 0)
|
||||
hh->SetError(HTTP_NOT_IMPLEMENTED, HANDLED_NOT_IMPLEMENTED);
|
||||
else {
|
||||
|
Reference in New Issue
Block a user