Solved

POST method with Location use

Posted on 1998-07-06
7
123 Views
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
0
Comment
Question by:tplai
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 2

Accepted Solution

by:
WDB earned 100 total points
ID: 1830519
Do not set the MIME type
(i.e. do not set Content-type: text/html)
0
 

Author Comment

by:tplai
ID: 1830520
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
0
 

Expert Comment

by:barlav
ID: 1830521
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.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 6

Expert Comment

by:alamo
ID: 1830522
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.
0
 

Author Comment

by:tplai
ID: 1830523
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




0
 
LVL 2

Expert Comment

by:WDB
ID: 1830524
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);
0
 
LVL 6

Expert Comment

by:alamo
ID: 1830525
tplai, did you ever solve this problem?
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
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 how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

760 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

17 Experts available now in Live!

Get 1:1 Help Now