On Sat, Mar 11, 2023 at 4:29 PM Daniel Sahlberg <daniel.l.sahlb...@gmail.com> wrote:
> Den lör 11 mars 2023 kl 13:06 skrev Pál Kovács <81.kovacs...@gmail.com>: > >> >> >> Dear All, >> >> I'd like to setup http traffic to be redirected to https on our svn >> server. >> Redirection works all right in most of the cases, except when we have a >> file-external with http in the url. >> For file-externals, svn export works as expected (in the export log it is >> visible that there was a redirection and the file is fetched). >> However when trying to checkout a working copy, file-externals are not >> downloaded, the log shows errors like this: >> >> Redirecting to URL ' >> https://myserver/svn/myrepo/TestFolder/Project2/test.txt': >> Fetching external item into 'checkout_target\test.txt': >> svn: warning: W200035: sqlite[S19]: NOT NULL constraint failed: >> EXTERNALS.def_repos_relpath >> >> I found a similar bug report for folder-externals, which was fixed in SVN >> 1.8.5 >> >> https://issues.apache.org/jira/browse/SVN-4428 >> >> >> Reproduction: >> - the webserver should be setup to redirect http traffic to https. In my >> case this is in the httpd config: >> >> Listen "80" http >> <VirtualHost *:80> >> UseCanonicalName off >> SSLEngine off >> RewriteEngine on >> RewriteRule ^/(.*) https://%{SERVER_NAME}:443/$1 [R=301,L] >> </VirtualHost> >> >> - use this script to create a file external with http url, then run an >> export (there should be no problem) and a checkout (file external should >> fail with the above error) >> - assuming you have an empty TestFolder in SVN >> - create a batch file in an empty local folder and run it: >> >> svn co https://myserver/svn/myrepo/TestFolder >> cd TestFolder >> md Project1 >> md Project2 >> echo "test file" > .\Project2\test.txt >> svn add --force * >> svn commit -m "commit test structure" >> svn propset svn:externals " >> http://myserver/svn/myrepo/TestFolder/Project2/test.txt test.txt" >> Project1 >> svn commit -m "added http external" >> cd .. >> svn export "http://myserver/svn/myrepo/TestFolder/Project1"; >> .\export_target >> svn checkout "http://myserver/svn/myrepo/TestFolder/Project1"; >> .\checkout_target >> pause >> >> - you can find the output of my test attached >> >> >> Test environment: >> - Operating system is Windows 10 Home [10.0.19044] >> - I have tested with a fresh installation of VisualSVN server (5.1.3) >> with no customisation, except enabling the http-https redirect >> - VisualSVN came with Subversion 1.14.2 client >> >> >> Could you advise if this is a bug or I'm missing something? >> >> Thanks and kind regards, >> >> Pal Kovacs >> 81.kovacs...@gmail.com >> > > There was a very similar report about one month ago ( > https://lists.apache.org/thread/x0v1tj68d2mz4vdoxj0bts8h5x892q9n) but it > didn't receive a reply at that time. I've been meaning to take a closer > look but I haven't found the time yet. > > Anyway, thanks for your very detailed report, it should make it a lot > easier to reproduce and hopefully fix. > > Kind regards, > Daniel > I have filed this issue as SVN-4911: https://issues.apache.org/jira/browse/SVN-4911 Nathan