Re: redirection error with file externals - possible bug
Hi, Thank you for your help. br, Pal On Sun, 2 Apr 2023, 22:26 Daniel Sahlberg, wrote: > Den sön 2 apr. 2023 kl 20:08 skrev Daniel Sahlberg < > daniel.l.sahlb...@gmail.com>: > >> I've spent some time today looking at the issue. I've been able to >> reproduce it, but my reproduction is not in a shape where I can share it. >> >> Basically I've setup a server where the repository was hosted at >> http://localhost/repo, configured an external. Then reconfigured the >> server so the repository is at http://localhost/r2 with >> http://localhost/repo issuing a http level redirect to /r2. >> >> I'm then able to reproduce the issue. >> >> Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman < >> hartman.nat...@gmail.com>: >> >>> 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 > >> This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of >> r1908925), where ieb->recorded_repos_relpath is null for a file external. >> For a folder external, it contains the folder name. >> >> I didn't check where recorded_repos_relpath came from but I think this is >> the logical next step. >> >> >>> 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 > >> I'm running out of time to check r1525902 (as referenced by this issue) >> but maybe this problem was fixed for folders and a similar fix can be >> applied also for files. >> > > r1525902 indeed fixed the problem but only for directory externals. The > same fix could be applied for file externals and I've committed a fix as > r1908926. > > I will also nominate this fix for backport to 1.14. > > Kind regards, > Daniel Sahlberg >
Re: redirection error with file externals - possible bug
Den sön 2 apr. 2023 kl 20:08 skrev Daniel Sahlberg < daniel.l.sahlb...@gmail.com>: > I've spent some time today looking at the issue. I've been able to > reproduce it, but my reproduction is not in a shape where I can share it. > > Basically I've setup a server where the repository was hosted at > http://localhost/repo, configured an external. Then reconfigured the > server so the repository is at http://localhost/r2 with > http://localhost/repo issuing a http level redirect to /r2. > > I'm then able to reproduce the issue. > > Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman < > hartman.nat...@gmail.com>: > >> 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 >>> > This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of > r1908925), where ieb->recorded_repos_relpath is null for a file external. > For a folder external, it contains the folder name. > > I didn't check where recorded_repos_relpath came from but I think this is > the logical next step. > > >> 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 >>> > I'm running out of time to check r1525902 (as referenced by this issue) > but maybe this problem was fixed for folders and a similar fix can be > applied also for files. > r1525902 indeed fixed the problem but only for directory externals. The same fix could be applied for file externals and I've committed a fix as r1908926. I will also nominate this fix for backport to 1.14. Kind regards, Daniel Sahlberg
Re: redirection error with file externals - possible bug
I've spent some time today looking at the issue. I've been able to reproduce it, but my reproduction is not in a shape where I can share it. Basically I've setup a server where the repository was hosted at http://localhost/repo, configured an external. Then reconfigured the server so the repository is at http://localhost/r2 with http://localhost/repo issuing a http level redirect to /r2. I'm then able to reproduce the issue. Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman : > 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 >>> >> This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of r1908925), where ieb->recorded_repos_relpath is null for a file external. For a folder external, it contains the folder name. I didn't check where recorded_repos_relpath came from but I think this is the logical next step. > 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 >>> >> I'm running out of time to check r1525902 (as referenced by this issue) but maybe this problem was fixed for folders and a similar fix can be applied also for files. Kind regards, Daniel Sahlberg
Re: redirection error with file externals - possible bug
On Sat, Mar 11, 2023 at 4:29 PM Daniel Sahlberg 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 >> >> UseCanonicalName off >> SSLEngine off >> RewriteEngine on >> RewriteRule ^/(.*) https://%{SERVER_NAME}:443/$1 [R=301,L] >> >> >> - 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
Re: redirection error with file externals - possible bug
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 > > UseCanonicalName off > SSLEngine off > RewriteEngine on > RewriteRule ^/(.*) https://%{SERVER_NAME}:443/$1 [R=301,L] > > > - 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
redirection error with file externals - possible bug
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 UseCanonicalName off SSLEngine off RewriteEngine on RewriteRule ^/(.*) https://%{SERVER_NAME}:443/$1 [R=301,L] - 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 repro_test.log Description: Binary data