Re: [PATCHv3] gitweb: make static files accessible with PATH_INFO
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jan 28, 2009, 00:55 UTC
- Message-ID
- <200901280155.26399.jnareb@gmail.com>
- In-Reply-To
- <cb7bb73a0901271643g7c3a8c42qff6025187ab3c081@mail.gmail.com>
On Wed, 28 Jan 2009, Giuseppe Bilotta wrote:
> On Wed, Jan 28, 2009 at 1:14 AM, Jakub Narebski <jnareb@gmail.com> wrote: > > On Tue, 27 Jan 2009, Giuseppe Bilotta wrote:
Show 11 quoted lines
> > > Of course, last time I forgot that the BASE href is supposed to be > > > absolute. While Opera apparently has no problem with it being relative, > > > other browsers such as Firefox are stricter about it. > > > > Errrr... I think you are talking about _full_ vs. _absolute_, not > > _absolute_ vs. _relative_, see below. > > No, I actually mean absolute vs relative in the URI sense, not in the > Perl/CGI sense. > > http://www.example.com/ is absolute, / is relative
No, "/" is not relative, it is absolute, because it begins with '/'. See RFC 1808 (Relative Uniform Resource Locators):
2.2. BNF for Relative URLs
[...]
URL = ( absoluteURL | relativeURL ) [ "#" fragment ]
absoluteURL = generic-RL | ( scheme ":" *( uchar | reserved ) )
generic-RL = scheme ":" relativeURL
relativeURL = net_path | abs_path | rel_path
net_path = "//" net_loc [ abs_path ] abs_path = "/" rel_path rel_path = [ path ] [ ";" params ] [ "?" query ]
(which means that CGI.pm -full is 'net_path', and -absolute is 'abs_path', and -relative is 'rel_path')
[...]
4. Resolving Relative URLs
[...]
Step 4: If the embedded URL path is preceded by a slash "/", the
path is not relative and we skip to Step 7.-- Jakub Narebski Poland