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 <firstname.lastname@example.org>
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sat Dec 20 08:06:44 2003