• Kyle J. McKay's avatar
    file.c: compute correct base URL when not absolute · d398b403
    Kyle J. McKay authored
    When a server makes use of the PATH_INFO feature in a CGI,
    the returned pages may often have a <base href="..." /> tag
    specifying the URL of the CGI itself as the base.
    
    However, to avoid hard-coding the scheme and host into such
    a base href, the href value will often omit the scheme, host
    and port.
    
    Make sure that when parsing any such base href value that
    any omitted components are taken from the current URL rather
    than taken as being from a bare, absolute file:/// URL.
    Signed-off-by: 's avatarKyle J. McKay <mackyle@gmail.com>
    d398b403
file.c 205 KB