POST method

Michael Vargo (mvarg@ctp.com)
Wed, 25 Sep 1996 10:52:08 -0700

Message-Id: <01BBAACF.9A26B200@cubehead.la.ctp.com>
From: Michael Vargo <mvarg@ctp.com>
To: "'fastcgi-developers@openmarket.com'"
Subject: POST method
Date: Wed, 25 Sep 1996 10:52:08 -0700

Has anyone successfully gotten the POST method to work?

Here's a snapshot...

else if (strcasecmp (method, "POST") == 0)
    {
        char buff[5120];
 
        printf ("Here\n");
 
        //fgets (buff, 5120, stdin);
        gets (buff);
        input =  strdup(buff);
 
        printf ("buff  = '%s'\n", buff);
        printf ("input = '%s'\n", input);
    }

echo "kjsdhfkjhd" | myProg

The output is:
Here
buff  = ''
input = ''

It always gives me an empty string no matter what I send to stdin...
If I use the fgets it works.

Thanks for any help.
mvarg@ctp.com