[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: HTTP GET doesn't do keyword replacement?

From: Ben Reser <ben_at_reser.org>
Date: 2003-12-20 08:05:08 CET

On Fri, Dec 19, 2003 at 09:35:16PM -0800, Karl Chen wrote:
> How come when you view a repository (in Apache 2) through a
> browser, keywords (e.g. $Id$) are not replaced?
>
> (With svn co, export, cat they show up as $Id: ...$, but HTTP
> non-DAV GET they show up as $Id$)

The client is responsible for handling keywords, not the server. I know
I asked this question on IRC a long time ago. The response I got was
that it would be terribly time consuming for a server to do so, since it
would have to read through the file looking for the keywords.

For DAV I don't think this would be a huge deal to support, it pretty
much has to read through the file to send it anyway. The only downside
would be that in order to send the proper Content-Length we'd have to do
so before sending the initial header response.

Additionally, we'd need a way to detect svn clients from web browsers.
One way we could do that was simply by the User-Agent they send. I'm
not sure if we're sending some other information to be able to detect
browsers from real svn clients or not.

It's been on my todo list to look into this. But I'm not sure how
welcome such work would be in this case. I certainly don't plan on
looking at this before 1.0. Even if the User-Agent is the only way to
tell, it would be an adequate work around for the time beeing and down
the line when we changed the protocol we could add some other header to
make this more explicit.

I'll get around to looking at it eventually, I certainly wanted to use
urls like http://foo/project/current/filename.pl to link to the current
version of some scripts without having to update them or export stuff
out of the repo to another URL, but still provide keywords so I can tell
what version they actually ended up with.

This is my thoughts only. I don't have commit access so don't take my
comments to mean that it will get implemented either.

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 20 08:06:44 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.