Solved

CGI Form variables and Location: header

Posted on 1998-04-15
3
212 Views
Last Modified: 2013-12-25
Is there a limit to the length of a CGI form variable when using the Location: header?  I have a textarea that contains over 8K of data.  The data gets truncated when it reaches the cgi script that is called like; Location:http://hostname/script.cgi?name=value.....
0
Comment
Question by:wspoulin
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
OM earned 100 total points
ID: 1832279
It depends of your OS. The query string is passed by environment
variables.

I suspect that this is the output of a CGI. Why do use a Location
if you need to call another CGI ? If it is not yours, better
call it and pass the returned value as result of your CGI.
0
 

Author Comment

by:wspoulin
ID: 1832280
So, the Location tag uses the get method which uses environment variables to pass everything after the ?.  Is this correct?  I have to use Location I believe.  How can I call  a cgi script from a cgi script without using it? I have to hand this data from one script to the other and the last script actually hands it off to one more!  Is there a way to use a POST method with Location?
0
 
LVL 1

Expert Comment

by:OM
ID: 1832281
In HTTP/1.0 nothing is specified, but in HTTP/1.1 recommandation, it is stated that :
     Note: When automatically redirecting a POST request after receiving
     a 301 status code, some existing HTTP/1.0 user agents will
     erroneously change it into a GET request.


Unfortunately, every browser I tested do this error.
So, the response is :
      no in HTTP/1.0 with current browser.
      yes in HTTP/1.1

The only way I see to turn around this is to call from the first
CGI the second one, then to return the values from the second one.
In a modern langage (Python for example, or of course in Java,
C, C++, ..) it is not so difficult.


0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question