During the recent server migration, I shifted svn services from http to https. Everything seemed to work fine, except for this error while creating branches.
frodo$ svn cp https://svn.xinh.org/svn/project/UberCool/trunk https://svn.xinh.org/svn/project/UberCool/branches/1.0
svn: Server sent unexpected return value (502 Bad Gateway) in response to COPY request for '/svn/project/!svn/bc/15/UberCool/trunk'
svn: Your commit message was left in a temporary file:
Googling around a bit helped. I'm using HTTPS over Apache + dav_svn module. This issue can be fixed by enabling mod_headers module in Apache and adding the following line at the end of your VirtualHost.