Solved

CGI Form variables and Location: header

Posted on 1998-04-15
3
210 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now