[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r10007: use an external program over
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r10007: use an external program over a network connect to process the data in the POST. |
Date: |
Sat, 21 Feb 2009 16:06:16 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10007
committer: address@hidden
branch nick: rtmp
timestamp: Sat 2009-02-21 16:06:16 -0700
message:
use an external program over a network connect to process the data in the
POST.
modified:
cygnal/http_server.cpp
=== modified file 'cygnal/http_server.cpp'
--- a/cygnal/http_server.cpp 2009-02-21 18:55:04 +0000
+++ b/cygnal/http_server.cpp 2009-02-21 23:06:16 +0000
@@ -43,13 +43,16 @@
#include "amf.h"
#include "element.h"
#include "cque.h"
-#include "http_server.h"
#include "log.h"
#include "network.h"
#include "handler.h"
#include "utility.h"
#include "buffer.h"
#include "diskstream.h"
+
+// Cygnal specific headers
+#include "http_server.h"
+#include "proc.h"
#include "cache.h"
// Not POSIX, so best not rely on it if possible.
@@ -288,8 +291,17 @@
// NOTE: this is a "special" path we trap until we have real CGI support
if ((_filespec == "/echo/gateway")
&& (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();
+ writeNet(fd, *reply);
+//
echo.stopCGI("/home/rob/projects/gnu/i686-pc-linux-gnu/gnash/rtmp/cygnal/cgi-bin/echo/gateway");
+#else
// const char *num = (const char *)buf->at(10);
- log_debug("Got CGI echo request in POST");
+// 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);
@@ -297,7 +309,7 @@
//boost::shared_ptr<amf::Element> &el1 = headers[1];
//boost::shared_ptr<amf::Element> &el3 = headers[3];
- if (headers.size() >= 4) {
+ if (headers.size() >= 4) {
if (headers[3]) {
amf::Buffer &reply = formatEchoResponse(headers[1]->getName(),
*headers[3]);
// cerr << "FIXME 3: " << hexify(reply.reference(), reply.allocated(),
true) << endl;
@@ -305,6 +317,7 @@
writeNet(fd, reply);
}
}
+#endif
} else {
amf::Buffer &reply = formatHeader(_filetype, _filesize, HTTPServer::OK);
writeNet(fd, reply);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r10007: use an external program over a network connect to process the data in the POST.,
rob <=