git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "W. Trevor King" <wking@drexel.edu>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v7 3/3] gitweb: add If-Modified-Since handling to git_snapshot().
Date: Wed, 28 Mar 2012 14:37:12 -0400	[thread overview]
Message-ID: <20120328183712.GA5992@odin.tremily.us> (raw)
In-Reply-To: <201203282011.32148.jnareb@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

On Wed, Mar 28, 2012 at 07:11:31PM +0100, Jakub Narebski wrote:
> W. Trevor King wrote:
> >  	print $cgi->header(
> >  		-type => $known_snapshot_formats{$format}{'type'},
> >  		-content_disposition => 'inline; filename="' . $filename . '"',
> > +		-last_modified => (%co ? $latest_date{'rfc2822'} : ()),
> >  		-status => '200 OK');
> 
> I'm sorry to be bearer of bad news, but this is still incorrect.
> It should be:
> 
>    	print $cgi->header(
>    		-type => $known_snapshot_formats{$format}{'type'},
>    		-content_disposition => 'inline; filename="' . $filename . '"',
>   +		%co ? (-last_modified => $latest_date{'rfc2822'}) : (),
>    		-status => '200 OK');

Grr.  Thanks.  I'm getting lots of rebase practice on this patch set,
but I'm still missing things…

> And it was not caught by test because CGI.pm can output the last modified
> header as "Last-modified" (RFC 2616, sec 4.2 states "Field names are
> case-insensitive"), so the last check should be
> 
>   +	! grep -i "Last-Modified" gitweb.output
> 
> Hmmm... why we use gitweb.output and not gitweb.headers?  Is it consistency
> with earlier tests?

Yes, but I can switch to `gitweb.headers` if you'd like.  Should I
adjust all the header tests in t9501 to use `gitweb.headers` and `grep
-i`?  It should probably be a separate patch for the tests that
existed before my i-m-s additions.

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2012-03-28 18:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120328164513.GA4389@odin.tremily.us>
2012-03-28 17:44 ` [PATCH v7 0/3] gitweb: refactor If-Modified-Since handling W. Trevor King
2012-03-28 17:44   ` [PATCH v7 1/3] gitweb: add `status` headers to git_feed() responses W. Trevor King
2012-03-28 17:44   ` [PATCH v7 2/3] gitweb: refactor If-Modified-Since handling W. Trevor King
2012-03-28 17:44   ` [PATCH v7 3/3] gitweb: add If-Modified-Since handling to git_snapshot() W. Trevor King
2012-03-28 18:11     ` Jakub Narebski
2012-03-28 18:37       ` W. Trevor King [this message]
2012-03-28 19:11         ` Junio C Hamano
2012-03-28 19:27           ` W. Trevor King
2012-03-28 21:45             ` Jakub Narebski
2012-03-28 21:28         ` Jakub Narebski
2012-03-29 12:45           ` [PATCH v8 0/3] gitweb: refactor If-Modified-Since handling W. Trevor King
2012-03-29 12:45             ` [PATCH v8 1/3] gitweb: add `status` headers to git_feed() responses W. Trevor King
2012-03-30 15:21               ` Jakub Narebski
2012-03-29 12:45             ` [PATCH v8 2/3] gitweb: refactor If-Modified-Since handling W. Trevor King
2012-03-30 15:30               ` Jakub Narebski
2012-03-29 12:45             ` [PATCH v8 3/3] gitweb: add If-Modified-Since handling to git_snapshot() W. Trevor King
2012-03-30 16:07               ` Jakub Narebski
2012-03-30 16:11             ` [PATCH v8 0/3] gitweb: refactor If-Modified-Since handling Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120328183712.GA5992@odin.tremily.us \
    --to=wking@drexel.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).