views:

624

answers:

3

Hi all,

Summary: I'm having some svn trouble, and after "debugging" it for a while, I'm not sure where to go from here. I figure someone else might have run into this problem before. The problem appears to be that I'm behind a transparent proxy my ISP uses, but this doesn't explain all the facts.

Details: I'm having trouble connecting my computer to an svn repository in my own domain, hosted on DreamHost. I'm using tortoise-svn's repo browser to connect, but after performing any action (adding a folder, expanding the source tree...) I get a "400: Bad Request message".

DreamHost and the svn faq both say that the problem could be that I'm behind some kind of proxy that my ISP has set up, without me having any control over it. The problem is, I have another repo that works just fine. That makes me a little unsure that that's really the problem, since I assume the proxy would stop every svn connection.

On the other hand, my friend manages to connect fine using a different ISP.

I'd appreciate any help with why this is happening (and only with one repo and not another), and where I can go from here.

Thanks in advance for any help.

[EDIT 1]: I also tried connecting to port 81 instead of 80, the DreamHost svn server doesn't seem to accept that (I get a "could not connect to server" error).

[EDIT 2]: Someone suggested, as per the svn faq, to connect using https. This would probably work, however, my DreamHost account doesn't have ssl right now, and adding it would cost me an additional charge per month. I'll probably do it if I have no other option, but I'd prefer to find a different solution, if I can, to keep costs down.

P.S. I wasn't sure whether to post this here or on ServerFault, since it's an svn question and I figure the most likely people to run into this problem are programmers.

P.P.S. If it helps anyone, I sniffed the traffic from my computer to the host with WireShark, and the last sent message (originating from my machine) is this:

REPORT /**** HTTP/1.1
Host: svn.***.com
User-Agent: SVN/1.6.5 (r38866)/TortoiseSVN-1.6.5.16974 neon/0.28.6
Connection: TE
TE: trailers
Content-Type: text/xml
Accept-Encoding: gzip
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
Content-Length: 109
Accept-Encoding: gzip
Authorization: Basic ***=

<?xml version="1.0" encoding="utf-8"?><S:get-locks-report xmlns:S="svn:" xmlns:D="DAV:"></S:get-locks-report>
A: 

If you can try connecting through a different port other then 80. I bet that the other repo that works fine is using https which is on a different port. Your ISP is filtering certain requests on port 80, or at least that would be my guess.


Update:

To connect to the server on a different port you will need to have the server configured to let you do so. It is not as simple as just placing :81 in the url. Your host will probably have to configure this for you. I would check with your host, sometimes they setup non-standard ports for common services to bypass problems such as yours.

You could also contact your ISP and see what they have to say about it. They will probably deny that they are doing any filtering but it is worth a shot.

MitMaro
I actually tried connecting using port 81 (you just add an :81 at the end of the url, like svn.mydoman.com:81/repo, right?). That suggestion is also in the faq.Unfortunately, I don't think the DreamHost server accepts that as an incoming port, since I get a "cannot connect to server" error.
Edan Maor
Only if your server is setup to accept connections on port 81.
MitMaro
I talked to my host again about this issue, and while they don't accept connections on other ports, they did point me in the direction of turning on ssh, which solved the problem.Thanks
Edan Maor
A: 

I found this on the TortoiseSVN site: 400 Bad Request

REPORT request failed on '...' REPORT of '...': 400 Bad Request (http://...)

You're behind a firewall which blocks DAV requests. Most firewalls do that. Either ask your Administrator to change the firewall, or access the repository with https:// instead of http:// like in https://svn.collab.net/repos/svn/ That way you connect to the repository with SSL encryption, which firewalls can't interfere with (if they don't block the SSL port completely).

crashmstr
Thanks, but I already read that... I updated the question to explain why I prefer another option.
Edan Maor
+2  A: 

I use Dreamhost SVN set up on my domain and access it through ssh+svn. This protocol doesn't need an SVN server set up at DH. Instead, it'll access your account over SSH and execute local shell commands to SVN.

The URL for the repository ends up being:

svn+ssh://[email protected]/home/yourDHusername/svn/yourrepositoryname/

This only works well if you set up passwordless SSH access to your DH shell account. To do this, you'll want to generate a public/private key pair, the private kept on your machine and the public uploaded to your DH shell account in ~/.ssh/authorized_keys. How you set this up exactly depends on your choice of OS. See e.g.:

http://blog.dreamhosters.com/kbase/index.cgi?area=138

Thanks, this is actually exactly what I ended up doing after a few more rounds back and forth with Dreamhost. One thing I didn't understand was why the url ends up being exactly that... I created a subdomain to host my svn (svn.mydomain.com), but using ssh, the url repo ends up not having anything to do with the subdomain. Do you have any idea why that is?
Edan Maor