- From: JFenner <JFenner@PEC.com>
- Date: Tue, 23 Jun 1998 08:45:49 -0400
- To: "'www-talk@w3.org'" <www-talk@w3.org>
POST specifies that the FORM information will be sent via stdin rather than the QUERY_STRING variable. Older web servers had a limit on how big the QUERY_STRING could be, usually about 256 characters. Therefore, if your FORM information was too big, you would need to use stdin to pass the name-value pairs into the cgi program. More modern web servers have much higher limits, sometimes several kbytes. Check your web server's documentation. To read from stdin, first use the CONTENT_LENGTH variable to determine how much to read in. In C, it looks something like: int length; int i; char c; char buffer [ SIZE ]; length = getenv( "CONTENT_LENGTH"); for( i=0; i < length; i++) { if( c = fgetc(stdin) == EOF) break; buffer[i] = c; } Hope this helps, John Fenner > -----Original Message----- > From: Jayesh Govindarajan [SMTP:jayeshg@WPI.EDU] > Sent: Tuesday, June 23, 1998 3:24 AM > To: www-talk@w3.org > Subject: GET / POST query > > > Hi ! all > > I have a quick question. > > I know that if there is a GET method specified in the HTML form as the > means of communication between the client and the server then one can use > the URL(with special strings and the query in it) to retrieve the HTML > page via a java program. > > Is there anyway one can communicate with a gateway program via a java > applet if the gateway program handles POST requests as opposed to GET. In > otherwords how do u communicate with a GAteway (CGI) program that does not > get its data via a URL ? > > Thanks > > Jayesh.
Received on Tuesday, 23 June 1998 08:42:14 UTC