We help IT Professionals succeed at work.

POST method with Location use

tplai asked
Last Modified: 2013-12-25
Problem on Microsoft Internet Explorer 3.0 and Netcape Navigator - OK on Netscape Communicator.

When I call a CGI with a POST method, this CGI ending with a Location statement, my navigator loops, and gives no response. The GET method is OK, but I don't want to use it for at less one reason.

Thierry - FRANCE
Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)


I don't set Content-type: text/html when I use the statement "Location" ! Location is the first thing my CGI sends to the navigator.

Thierry - FRANCE

print "Location: some machine/some directory/some file"
I use this in my cgi scripts and it works fine with Ie 3.0 and Netscape as long as I don't set Content-type: text/html. My cgi's are also called with post methods.

Thierry, apparently there is some odd problem with the exact form of the Location: directive you are using.

To help debug this, you must tell us 2 things: the exact print statement used to send Location (you can disguise the url if you want), and the type of web server you are using.

The server is useful to know because the Location directive is sent to and interpreted by the server, not directly to the browser. Anyone trying to duplicate this problem with a different server might not be duplicating the same problem.


To alamo:

Here are the 2 things you want to know :

1/ the exact print statement used to send Location is, in C language : fprintf(stdout, "Location:/cgi-bin/mycgi.cgi?_Session=123456&_Action=LOGIN&_Destinat=456789%c%c", 10, 10);

2/ the type of web server I am using is Netscape Enterprise Server, but the problem is the same with Netscape Commerce Server.

Thierry - FRANCE


Try using the complete path of your location.

  fprintf(stdout,"Location: http://www.some_domain.com/cgi-bin/mycgi.cgi?_Session=123456&_Action=LOGIN&_Destinat=456789%c%c", 10, 10);

tplai, did you ever solve this problem?
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.