File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1249,14 +1249,26 @@ public function isHtaccessWorking(\OCP\IConfig $config) {
12491249 $ content = false ;
12501250 }
12511251
1252+ if (strpos ($ url , 'https: ' ) === 0 ) {
1253+ $ url = 'http: ' . substr ($ url , 6 );
1254+ } else {
1255+ $ url = 'https: ' . substr ($ url , 5 );
1256+ }
1257+
1258+ try {
1259+ $ fallbackContent = \OC ::$ server ->getHTTPClientService ()->newClient ()->get ($ url )->getBody ();
1260+ } catch (\Exception $ e ) {
1261+ $ fallbackContent = false ;
1262+ }
1263+
12521264 // cleanup
12531265 @unlink ($ testFile );
12541266
12551267 /*
12561268 * If the content is not equal to test content our .htaccess
12571269 * is working as required
12581270 */
1259- return $ content !== $ testContent ;
1271+ return $ content !== $ testContent && $ fallbackContent !== $ testContent ;
12601272 }
12611273
12621274 /**
You can’t perform that action at this time.
0 commit comments