Re: [PATCHv2 6/6] gitweb: check if-modified-since for feeds

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

 



On Thu, Feb 5, 2009 at 3:03 AM, Jakub Narebski <jnareb@xxxxxxxxx> wrote:
> On Mon, 26 Jan 2009, Giuseppe Bilotta wrote:
>
>> Offering Last-modified header for feeds is only half the work, even if
>> we bail out early on HEAD requests. We should also check that same date
>> against If-modified-since, and bail out early with 304 Not Modified if
>> that's the case.
>
> It looks now quite nice, but I'd like to see information about
> dependencies for this feature in the commit message, something like:
>
>   This feature (terminating early with '304 Not Modified' in response
>   to 'If-Modified-Since' conditional request) requires having either
>   HTTP::Date module (from libwww-perl) or Time::ParseDate module.
>   If neither is present gitweb falls back to earlier behaviour of not
>   reacting to 'If-Modified-Since'.

Good idea.

> Note also (although I'm not sure if it is worth mentioning in commit
> message) that it doesn't save gitweb as much work as one could think,
> because at this place the whole list of commits is already generated
> and parsed.  What we save is cost of running git-diff-tree for each
> commit (we could do better here, I think), and of course bandwidth.

If it's possible to get the first commit without generating and
parsing the entire commit list, this can probably be optimized
further.

> I wonder if it would be possible to separate this code into subroutine,
> to make it possible to have support for "cache control" conditional
> requests also in other cases where it might help (for the future of
> course, not in this commit).

Yes, I thought about it too.

>
> Perhaps if we run gitweb from Apache mod_perl in compatibility mode
> (ModPerl::Registry) to use Apache Perl API to respond to
> 'If-Modified-Since' ($r->is_fresh or something). But that is also
> just idea for the future improvement.

Also, it's way beyond my current knowledge of Apache, CGI and Perl 8-D

-- 
Giuseppe "Oblomov" Bilotta
--
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