gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/rtmp r10017: execute an external progam wh


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r10017: execute an external progam when specified.
Date: Sat, 21 Feb 2009 17:43:24 -0700
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10017
committer: address@hidden
branch nick: rtmp
timestamp: Sat 2009-02-21 17:43:24 -0700
message:
  execute an external progam when specified.
modified:
  cygnal/http_server.cpp
=== modified file 'cygnal/http_server.cpp'
--- a/cygnal/http_server.cpp    2009-02-21 23:06:16 +0000
+++ b/cygnal/http_server.cpp    2009-02-22 00:43:24 +0000
@@ -44,6 +44,7 @@
 #include "element.h"
 #include "cque.h"
 #include "log.h"
+#include "crc.h"
 #include "network.h"
 #include "handler.h"
 #include "utility.h"
@@ -68,7 +69,10 @@
 namespace cygnal
 {
 
+// The rcfile is loaded and parsed here:
+static CRcInitFile& crcfile = CRcInitFile::getDefaultInstance();
 static Cache& cache = Cache::getDefaultInstance();
+// static Proc& cgis = Proc::getDefaultInstance();
 
 HTTPServer::HTTPServer() 
 {
@@ -289,25 +293,24 @@
     // Send the reply
 
     // NOTE: this is a "special" path we trap until we have real CGI support
-    if ((_filespec == "/echo/gateway")
+    if ((getField("content-type") == "application/x-amf")
        && (getField("content-type") == "application/x-amf")) {
 #if 1
-       Proc echo;
-//     
echo.startCGI("/home/rob/projects/gnu/i686-pc-linux-gnu/gnash/rtmp/cygnal/cgi-bin/echo/gateway",
 true, 1234);
-       echo.createClient("localhost", 1234);
-       echo.writeNet(*content);
-       boost::shared_ptr<amf::Buffer> reply = echo.readNet();
+       if (_filespec == "/echo/gateway") {
+       }
+       
+       Proc cgis;
+       cgis.setDocroot(_docroot);
+//     
cgis.setDocroot("/home/rob/projects/gnu/i686-pc-linux-gnu/gnash/rtmp/cygnal/cgi-bin");
+       cgis.startCGI("/echo/gateway", true, 1234);
+       cgis.createClient("localhost", 1234);
+       cgis.writeNet(*content);
+       boost::shared_ptr<amf::Buffer> reply = cgis.readNet();
        writeNet(fd, *reply);
-//     
echo.stopCGI("/home/rob/projects/gnu/i686-pc-linux-gnu/gnash/rtmp/cygnal/cgi-bin/echo/gateway");
+//     cgis.stopCGI("/echo/gateway");
 #else
-//     const char *num = (const char *)buf->at(10);
-//     log_debug("Got CGI echo request in POST");
-//     cerr << "FIXME 2: " << hexify(content->reference(), 
content->allocated(), true) << endl;
-
        vector<boost::shared_ptr<amf::Element> > headers = 
parseEchoRequest(*content);
        //boost::shared_ptr<amf::Element> &el0 = headers[0];
-       //boost::shared_ptr<amf::Element> &el1 = headers[1];
-       //boost::shared_ptr<amf::Element> &el3 = headers[3];
        
        if (headers.size() >= 4) {
            if (headers[3]) {
@@ -891,6 +894,8 @@
     
     string docroot = args->filespec;
 
+//     cgis.setDocroot(args->filespec);
+    
     www->setDocRoot(docroot);
     log_debug("Starting to wait for data in net for fd #%d", args->netfd);
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]