Re: FastCGI-developers Digest, Vol 13, Issue 3

Ricardo Sal <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Hi,

I think you just won the lottery because i have implemented this recently
and had the same problem.
Lucky for you, you get an answer with what you need.

1º read this page
http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S2.3

These are some sniff and screen shots in attach with the data been
transferred between a test web server with fastcgi enabled and php-cgi.exe
in listening mode.

Feel free to ask whatever you need since i have implement all the protocol
with my hands :)
The implementation isn't hard, and with this data you will be able to start.

regards


On Mon, Aug 10, 2009 at 5:00 PM, <
fastcgi-developers-request-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org> wrote:

> Send FastCGI-developers mailing list submissions to
>        fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
> or, via email, send a message with subject or body 'help' to
>        fastcgi-developers-request-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
>
> You can reach the person managing the list at
>        fastcgi-developers-owner-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of FastCGI-developers digest..."
>
>
> Today's Topics:
>
>   1. newbie question, help heeded (Eduard Bareev)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 10 Aug 2009 19:29:48 +0400
> From: Eduard Bareev <[email protected]>
> Subject: [FASTCGI] newbie question, help heeded
> To: fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
> Message-ID:
>        <ba3c638b0908100829y662316bdpe68b9f5b8aea1d40-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi!
> I trying to develop highspeed web-service and i have some questions, and
> also i am not c++ programmer and this is my first cpp project.
>
> I have this following code:
> ---------------------------------------------------------
> #include <string>
> #include "fcgi_stdio.h"
> #include <stdlib.h>
> #include <iostream>
>
> void handle(FCGX_Request request){
>        FCGX_FPrintF(request.out, "Content-type:
> text/html\r\n\r\n<TITLE>fastcgi</TITLE>\n<H1>Fastcgi: Hello
> world!</H1>\n");
> }
>
> int main(int argc, char* const argv[] )
> {
>    std::string port=":9001";
>    int listenQueueBacklog = 400;
>    FCGX_Stream *in, *out, *err;
>    FCGX_ParamArray envp;
>
>    if(FCGX_Init())    exit(1);
>
>    int listen_socket = FCGX_OpenSocket(port.c_str(), listenQueueBacklog);
>    if(listen_socket < 0)    exit(1);
>
>    FCGX_Request request;
>    if(FCGX_InitRequest(&request,  listen_socket, 0)) exit(1);
>
>    int reqCounter = 0;
>    while(FCGX_Accept_r(&request) == 0)
>    {
>        handle(request);
>        reqCounter++;
>        FCGX_FPrintF(request.out, "\n\r\n\r counter: %d", reqCounter);
>        FCGX_Finish_r(&request);
>    }
>    return 0;
> }
> ---------------------------------------------------------
>
> It works good listening 9001 port and serving resquests from nginx http
> server. I choose fcgi_stdio beacuse it can listen on tcp socket and it is
> more simple to integrate all this stuff with nginx web server.
>
> But how can i read post fields?
> Anyone, please point to an example of accessing and parsing post data,
> setting cookies, and other web stuff! I can't find any tutorials or
> examples
> on the internet!
>
> Thanks!
>
> --
> Eduard Bareev
> [email protected]
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20090810/99d4f519/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> FastCGI-developers mailing list
> FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
> http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
>
>
> End of FastCGI-developers Digest, Vol 13, Issue 3
> *************************************************
>

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
Upload php.rar (application/octet-stream, 304.8 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.