arunhorne has asked for the wisdom of the Perl Monks concerning the following question:

Monks

I'm not entirely clear if this is an apache problem or a perl problem so I'll moot it here in the hope that it is relevant. I have written a CGI script that dynamically generates a graph using the excellent AT&T GraphViz package. However, you are supposed to be able to naviagte through the graph by clicking on various vertices, and GraphViz provides a server side image map for doing this. To use my script you just specify the node of the graph to centre on as a parameter ('ec'), thus:

http://localhost/~arun/cgi-bin/egv.pl?ec=1.1.1.1

This works fine if I enter it manually as a URL and draws graphs. The URL format used by the image map is the same and thus should draw a graph by generating a URL in the form above appropriate to the node that was clicked. However, when clicked after a substantial pause a webpage saying the following appears:

Found The document has moved here.

The 'here' part of the above sentence is hyperlinked and clicking it takes me to the correct page that I should have reached originally. So my question is, why do I not go directly to the page I want, why is this intermediate page displayed with the link to the page I want embedded in it.

Does anyone know how I can fix this?

Incase it helps, these headers are displayed above the 'Found' bit:

HTTP/1.1 302 Found Date: Wed, 24 Jul 2002 09:22:52 GMT Server: Apache/ +1.3.24 (Unix) Location: http://localhost/~arun/cgi-bin/egv.pl?ec=1.14 +.14.1 ep-Alive: timeout=15, max=98 Connection: Keep-Alive Transfer-En +coding: chunked Content-Type: text/html; charset=iso-8859-1 12c

____________
Arun

Replies are listed 'Best First'.
Re: Server-Side Image Map Problems
by Abigail-II (Bishop) on Jul 24, 2002 at 10:22 UTC
    That doesn't seem like a Perl, nor an Apache problem to me. HTTP 302 is a perfectly valid return status. It's up to the browser to decide what to do with it. A browser could request the page given in the Location header and display that instead. It looks like your browser decides to display a message.

    I suggest finding out when your browser requests the page its redirected to and when it doesn't (some browser only do a limited number of redirects before giving up).

    Abigail

Re: Server-Side Image Map Problems
by flocto (Pilgrim) on Jul 24, 2002 at 10:36 UTC

    My guess is, that there is a script that creates your value for ec and tries to redirect the UA to that page. Have your tried to use any other browser? I don't know which browsers to not support this kind of redirection, but they certainly don't have to..

    Regards,
    -octo