home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / XIOS213C / CGI-SRC / TESTCGI1.C < prev    next >
Text File  |  1997-04-29  |  1KB  |  40 lines

  1. /*  ----------------------------------------------------------------<Prolog>-
  2.     Name:       testcgi1.c
  3.     Title:      CGI test program
  4.     Package:    Xitami web server
  5.  
  6.     Written:    96/10/01  Pieter Hintjens <ph@imatix.com>
  7.     Revised:    97/04/29  Pieter Hintjens <ph@imatix.com>
  8.  
  9.     Synopsis:   Generates an HTML test page containing the arguments passed
  10.                 to the CGI process.
  11.  
  12.     Copyright:  Copyright (c) 1997 iMatix
  13.     License:    This is free software; you can redistribute it and/or modify
  14.                 it under the terms of the XITAMI License Agreement as provided
  15.                 in the file LICENSE.TXT.  This software is distributed in
  16.                 the hope that it will be useful, but without any warranty.
  17.  ------------------------------------------------------------------</Prolog>-*/
  18.  
  19. #include "sfl.h"
  20.  
  21. int
  22. main (int argc, char *argv [])
  23. {
  24.     /*  Generates full HTTP header
  25.      *
  26.      *  This should be passed through the server transparently
  27.      *  Some servers require that the CGI program be named 'nsp-'.
  28.      *  Xitami detects the HTTP header automatically.
  29.      *  Note that this will not work with the Keep-Alive option enabled,
  30.      *  since the content-length is not specified.
  31.      */
  32.     puts ("HTTP/1.0 200 Ok");
  33.     puts ("Content-Type: text/html");
  34.     puts ("");
  35.     puts ("<HTML>");
  36.     puts ("<BODY>Test program 1</BODY></HTML>");
  37.  
  38.     return (EXIT_SUCCESS);
  39. }
  40.