Re: [cgit PATCH] use Host: header to generate cgit_hosturl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lars Hjemli <hjemli@xxxxxxxxx> wrote:
> On Tue, Sep 2, 2008 at 1:07 AM, Eric Wong <normalperson@xxxxxxxx> wrote:
> > Lars Hjemli <hjemli@xxxxxxxxx> wrote:
> >> On Mon, Sep 1, 2008 at 8:30 AM, Eric Wong <normalperson@xxxxxxxx> wrote:
> >> > So use the "Host" header if it is available and fall back to
> >> > SERVER_NAME/SERVER_PORT for some clients that don't set
> >> > HTTP_HOST.
> >>
> >> Maybe it would be better to use a new cgitrc parameter as fallback if
> >> the client doesn't provide the "Host" header?
> >
> > That sounds a bit hackish to me since HTTP_HOST, SERVER_NAME and
> > SERVER_PORT are all standardized.  Anyhow, it's your call :)
> 
> I just figured that since SERVER_NAME/SERVER_PORT doesn't work in a
> setup like the one you described, clients which doesn't provide the
> "Host" header would never get a correct url. A default value for the
> "Host" header in cgitrc would work around this issue.

Actually, in my situation, the proxy server will unconditionally set a
Host: header before sending the request to the lighttpd backend.  Header
rewriting/injection is a common feature in HTTP aware proxies.

-- 
Eric Wong
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux