I handle request on different threads. I do some pre-processing on
scgi data and I fill a struct:

request.get[]
request.post[]
request.cookie[]
request.headers[string]

then I call a virtual function (to override on subclasses) like:

do(request, output);

where user fill output struct in a way like:

output.data ~= "<html><body><h1>hello world</h1></body></html>";
output.status = 200
output.cookies = bla bla

and then if is method != "head" i send headers + data, else just
"headers".

btw 99% of usage is get, post, head.




== Quotato dall`articolo Jacob Carlborg (d...@me.com)
> On 2011-10-17 10:14, Andrea Fontana wrote:
> > I'm working on a SCGI implementation for my job. SCGI is quite
easy to
> > handle and well-supported by servers.
> > The only missing part is multipart POST (used for file post).
> >
> > get, post, cookie, headers (etc..) just work.
> >
> > I have to ask permission to publish my code, btw it's a very
easy
> > protocol to implement.
> What about the rest of the HTTP methods?
> > Il giorno ven, 14/10/2011 alle 21.14 -0400, Jeremy Sandell ha
scritto:
> >> Hello!
> >>
> >>
> >> Does anyone know if there's a D2 binding or implementation for
fastcgi
> >> as of yet?
> >>
> >>
> >> Thanks!
> >> Jeremy Sandell

Reply via email to