All in all, apache should do the right thing with slashes.

Here's a long winded explanation on why it's fine...

Let's put it this way. When you click on a link in a browser, it's supposed to issue an http request to the server based on the href. If the href has ../../../ etc, it will strip a few directories in the request. LIkewise if you do ../tmp/../tmp/../tmp. That's basic directory resolving in any os (replace /'s with \'s).

So if you are at http://www/somedir/somedir2 and clicked a link http="../", you'll ask for http://www/somedir , if you clicked http="../somedir2/../somedir2" it should request http://www/somedir2/../somedir2. That is a guess. It may recompress it back to http://somedir/somedir2, but that's somethign to test and play with. not very useful :)

Anyway, the browser should try and compress it somewhat, turning initial ../'s back into something shorter. The request is sent to the server and it can interpret it ANY WAY it wants. Doing something like /cgi-bin/this.cgi/that will pass that as an argument to your this.cgi script. This is a feature of the server 'cause it parses it that way. Well, at least apache did last i checked :) Anyway, last check, apache on windows should translate http://blah/this/../that/ int c:\whereyouinstalledapache\htdocs\this\..\that, which should turn into c:\whereyouinstalledapache\htdocs\that.


Play that funky music white boy..

In reply to Re: Re: Re: CGI Image on localhost by exussum0
in thread CGI Image on localhost by eoin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.