From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Martin Koegler <mkoegler@auto.tuwien.ac.at>
Subject: Re: [PATCH] gitweb: Support comparing blobs (files) with different names
Date: Wed, 4 Apr 2007 23:27:49 +0200 [thread overview]
Message-ID: <200704042327.49632.jnareb@gmail.com> (raw)
In-Reply-To: <200704031657.25698.jnareb@gmail.com>
On Tue, Apr 03, 2007 at 16:57 +0200, Jakub Narebski wrote:
> On Sun, Apr 1, 2007, Junio C Hamano wrote:
>> Jakub Narebski <jnareb@gmail.com> writes:
>>
>>>> First is not escaped filename in HTTP header. There was some discussion
>>>> about this, and even patch by Luben Tuikov which added to_qtext
>>>> subroutine to deal with escaping in HTTP [...]
>>>
>>> Junio, do you remember by chance why this patch was dropped?
>>
>> No, but I suspect that was because the noisiness of the thread
>> around them suggested they were not ready to be applied. I do
>> not remember if people submitted the patch and commented on
>> reached a consensus.
>
> Probably not. Here is alternative proposal. It does not implement
> RFC2184: MIME Parameter Value and Encoded Word Extensions
> but I'm not sure if 1) it is needed for _HTTP_ Content-Disposition
> header filename, 2) all browsers implement it.
[...]
> P.P.S. Here is an example of RFC2184 encoded header:
>
> Content-Type: application/x-stuff
> title*1*=us-ascii'en'This%20is%20even%20more%20
> title*2*=%2A%2A%2Afun%2A%2A%2A%20
> title*3="isn't it!"
Another example:
Content-Type: text/plain; charset=utf-8\r
Content-Disposition: inline; filename*=utf-8'en-US'This%20is%0A%20%2A%2A%2Afun%2A%2A%2A
Although "RFC 2183: The Content-Disposition Header Field" says:
Parameter values longer than 78 characters, or which contain non-ASCII
characters, MUST be encoded as specified in [RFC 2184].
the limit of 78 characters is because it is was created for mail, and
some old MUA had limit on line length. It is not the case of HTTP
protocol: lines can be, and are, quite long. Besides for example
Apache 2.0.54 does not understand MUA-style continued HTTP headers
if in 'parse headers' mode: it returns server error.
As to browsers: Mozilla 1.7.12 implements RFC2183 correctly, although for
example shows %0A / \n as a strange symbol in "save as" dialog, created
file has embedded newline in filename, as it should. But both Lynx 2.8.5,
and ELinks 0.10.3 do not implement it fully and without errors.
So that is why we have:
# It not worth potential problems to try to carry newlines
# in the header; it is just _suggested_ filename
$filename =~ s/[[:cntrl:]\n\r]/_/g;
P.S. If there were no objections (no discussion), I'd resend
content_disposition subroutine as patch to gitweb in about a week.
--
Jakub Narebski
ShadeHawk on #git
Poland
next prev parent reply other threads:[~2007-04-04 23:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-25 20:34 [PATCH] gitweb: show no difference message Martin Koegler
2007-03-25 20:34 ` [PATCH] gitweb: Support comparing blobs with different names Martin Koegler
2007-03-25 20:34 ` [PATCH] gitweb: link base commit (hpb) to blobdiff output Martin Koegler
2007-03-25 20:34 ` [PATCH] gitweb: support filename prefix in git_patchset_body Martin Koegler
2007-03-25 20:34 ` [PATCH] gitweb: support filename prefix in git_difftree_body Martin Koegler
2007-03-25 20:34 ` [PATCH] gitweb: Add treediff Martin Koegler
2007-03-26 17:12 ` Jakub Narebski
2007-03-26 21:05 ` Martin Koegler
2007-03-27 1:15 ` Jakub Narebski
2007-03-26 17:12 ` [PATCH] gitweb: support filename prefix in git_patchset_body Jakub Narebski
2007-03-26 20:55 ` Martin Koegler
2007-03-27 1:07 ` Jakub Narebski
2007-03-26 17:12 ` [PATCH] gitweb: Support comparing blobs (files) with different names Jakub Narebski
2007-03-26 20:41 ` Martin Koegler
2007-03-27 0:56 ` Jakub Narebski
2007-03-27 19:56 ` Martin Koegler
2007-03-27 23:58 ` Jakub Narebski
2007-03-28 21:03 ` Martin Koegler
2007-03-30 8:48 ` Jakub Narebski
2007-03-30 23:55 ` Jakub Narebski
2007-03-31 9:18 ` Martin Koegler
2007-03-31 16:16 ` Jakub Narebski
[not found] ` <7vmz1t6oe2.fsf@assigned-by-dhcp.cox.net>
2007-04-03 14:57 ` Jakub Narebski
2007-04-04 21:27 ` Jakub Narebski [this message]
2007-04-05 10:38 ` Junio C Hamano
2007-03-31 14:52 ` [PATCH] gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches Jakub Narebski
2007-03-26 17:11 ` [PATCH] gitweb: show no difference message Jakub Narebski
2007-03-26 21:01 ` Jakub Narebski
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=200704042327.49632.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=mkoegler@auto.tuwien.ac.at \
/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).