[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

CGI Form variables and Location: header

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
wspoulin
Asked:
wspoulin
  • 2
1 Solution
 
OMCommented:
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
 
wspoulinAuthor Commented:
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
 
OMCommented:
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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now