Loading ...
Sorry, an error occurred while loading the content.

How the server should get the output of a CGI script

Expand Messages
  • ripuda
    Hi all, we have been developing a HTTP/1.1 server that will support cgi scripts. please any body let me know how should i get the output of a cgi or perl
    Message 1 of 2 , May 6, 2004
    • 0 Attachment
      Hi all,
      we have been developing a HTTP/1.1 server that will support
      cgi scripts. please any body let me know how should i get the
      output of a cgi or perl script. though, we know that these script
      program sends their output on STDOUT device but how the server
      should read or get that output
      Thank in advance
      ripudaman singh
      software engineer
    • Alex Rousskov
      ... The exact solution would depend on your programming language, libraries you can use, operating system, desired performance, and a set of features you want
      Message 2 of 2 , May 22, 2004
      • 0 Attachment
        On Thu, 6 May 2004, ripuda wrote:

        > we have been developing a HTTP/1.1 server that will support
        > cgi scripts. please any body let me know how should i get the
        > output of a cgi or perl script. though, we know that these script
        > program sends their output on STDOUT device but how the server
        > should read or get that output

        The exact solution would depend on your programming language,
        libraries you can use, operating system, desired performance, and a
        set of features you want to support. All of the above may affect how
        one captures the output of a program from another program. For a
        simple, partial, C-centric solution, consider using a popen(3) call.

        There are open source servers with elaborate CGI support; in theory,
        you may be able to extract the logic and specifics from Apache httpd
        or another open source server.

        Note that, ideally, you also want to capture and log STDERR output of
        a CGI script.

        None of the above is related to HTTP or HTTP compliance so you may
        want to find a more appropriate venue for followup questions.

        Alex.

        --
        Protocol performance, functionality, and reliability testing.
        Tools, services, and know-how.
        http://www.measurement-factory.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.