Legacy Archive (2013): Originally written in Chinese on doubixie.com and translated into English for this edition. All archive posts · Home

Fixing SVN Update Failures Behind an Nginx Server

Original Chinese title: nginx svn 服务器出现的无法update问题

The SVN unable-to-fetch issue

64-bit Win7, SVN client TSVN, server Debian + Nginx

checkout works

cannot update or add

cannot check log

SVN error: An existing connection was forcibly closed by the remote host

##nginx error_log

client sent "Transfer-Encoding: chunked" header while reading client    
request headers, client: xxx, server: xxx,
request: "OPTIONS /xxx/xxx HTTP/1.1", host: "xxx"

This shows Nginx did receive the SVN request—no idea why it became chunked though.

Accessing it with a 32-bit client worked with zero issues.

Using x64 SVN against several other SVN servers also worked fine.

Apparently it was because the Nginx we were running couldn’t accept chunked requests.

So this seems like the first time I dug this deep—even felt the urge to read the source code. If I really wanted to understand what’s going on, I’d probably have to read the x64 TSVN source code to see what it sends on commit, and then check how Nginx 1.2.1 handles chunked requests. Of course, all of that assumes figuring out what chunking actually is first.

#Update
Sure enough, after upgrading to Nginx 1.4.1, there are no issues at all.

Lots of things to read up on.
http://www.vnsecurity.net/2013/05/analysis-of-nginx-cve-2013-2028/

Still, x32 and x64 TSVN actually use different commit methods—no idea why.