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

Re: Feature request: retain query in

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Fri, 21 Aug 2009 11:59:51 -0500

On Aug 21, 2009, at 10:09, Rob Hubbard wrote:

> Is this syntax expected to work with the SVN command-line client?
> Or is
> this something specific to the serving of listings in the browser.
>
> That is, in a browser I can write:
> http://svn/path/repos/dir/subdir/?p=1000&r=1234
> can I expect to be able to use this in a command shell (e.g. DOS or
> Bash):
> svn ls 'http://svn/path/repos/dir/subdir/?p=1000&r=1234'
> or must I continue to use
> svn ls http://svn/path/repos/dir/subdir@1000 -r1234
>
> (I realise that the query syntax is an HTTP-specific URL syntax.)

When I try it, I get:

$ svn ls 'http://svn/path/repos/dir/subdir/?p=1000&r=1234'
svn: URL 'http://svn/path/repos/dir/subdir/?p=1000&r=1234' is not
properly URI-encoded

Honestly, it never would have occurred to me to try the p=...&r=...
URL syntax with a Subversion client. AFAIK it is meant to be used in
a web browser only.

> Incidentally, I noticed another minor problem:
>
> In a browser I can write
> http://svn/path/repos/dir/subdir/?p=1000&r=1234
> and
> http://svn/path/repos/dir/subdir/file.txt?p=1000&r=1234
> but not
> http://svn/path/repos/dir/subdir?p=1000&r=1234
> that is: on a directory, the final slash is required on a directory
> URL.
> (Without a query, the browser, or perhaps the web server, will
> supply a
> missing slash.)

The slash is required at the end of a directory. That's pretty
standard. If you request a URL without the slash after a directory,
most HTTP servers will send you a 301 Moved Permanently redirect to
the URL with the slash. For example:

$ curl -I http://www.apple.com/macosx?foo
HTTP/1.1 301 Moved Permanently
Date: Fri, 21 Aug 2009 16:47:42 GMT
Content-Type: text/html; charset=iso-8859-1
Expires: Fri, 21 Aug 2009 16:57:42 GMT
Cache-Control: max-age=600
nnCoection: close
Server: Apache/2.2.9 (Unix)
Location: http://www.apple.com/macosx/?foo

In the case of Subversion, I see:

$ curl -I 'http://myserver.local/dir?r=150&p=151'
HTTP/1.1 301 Moved Permanently
Date: Fri, 21 Aug 2009 16:54:32 GMT
Server: Apache/2.2.11 (Unix) DAV/2 SVN/1.6.4
Location: http://myserver.local/dir/
Content-Type: text/html; charset=iso-8859-1

So it's correct to be redirecting you to add the slash, but it's
forgetting to append the query string to the redirect URL. I would
call that a bug, and I don't see a report filed about it, so please
file one in the issue tracker, and include a link back to this
mailing list discussion.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2386066

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-21 19:00:59 CEST

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

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