Skip to content

Commit c704847

Browse files
committed
Use GitHub to fetch mime types
1 parent 56c242a commit c704847

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

build/controllers/MimeTypeController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* MimeTypeController generates a map of file extensions to MIME types.
1717
*
1818
* It uses `mime.types` file from apache http located under
19-
* https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=markup
19+
* https://raw.githubusercontent.com/apache/httpd/refs/heads/trunk/docs/conf/mime.types
2020
*
2121
* This file has been placed in the public domain for unlimited redistribution,
2222
* so we can use it and ship it with Yii.
@@ -76,13 +76,13 @@ public function actionIndex($outFile = null, $aliasesOutFile = null, $extensions
7676
}
7777

7878
$this->stdout('Downloading mime-type file from apache httpd repository...');
79-
if ($apacheMimeTypesFileContent = file_get_contents('https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=co')) {
79+
if ($apacheMimeTypesFileContent = file_get_contents('https://raw.githubusercontent.com/apache/httpd/refs/heads/trunk/docs/conf/mime.types')) {
8080
$this->stdout("Done.\n", Console::FG_GREEN);
8181
$this->generateMimeTypesFile($outFile, $apacheMimeTypesFileContent);
8282
$this->generateMimeAliasesFile($aliasesOutFile);
8383
$this->generateMimeExtensionsFile($extensionsOutFile, $apacheMimeTypesFileContent);
8484
} else {
85-
$this->stderr("Failed to download mime.types file from apache SVN.\n");
85+
$this->stderr("Failed to download mime.types file from apache Git.\n");
8686
}
8787
}
8888

@@ -119,7 +119,7 @@ private function generateMimeTypesFile($outFile, $content)
119119
* This file contains most commonly used MIME types
120120
* according to file extension names.
121121
* Its content is generated from the apache http mime.types file.
122-
* https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=markup
122+
* https://raw.githubusercontent.com/apache/httpd/refs/heads/trunk/docs/conf/mime.types
123123
* This file has been placed in the public domain for unlimited redistribution.
124124
*
125125
* All extra changes made to this file must be comitted to /build/controllers/MimeTypeController.php
@@ -214,7 +214,7 @@ private function generateMimeExtensionsFile($outFile, $content)
214214
* If there are multiple extensions for a singe MIME type
215215
* they are ordered from most to least common.
216216
* Its content is generated from the apache http mime.types file.
217-
* https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=markup
217+
* https://raw.githubusercontent.com/apache/httpd/refs/heads/trunk/docs/conf/mime.types
218218
* This file has been placed in the public domain for unlimited redistribution.
219219
*
220220
* All extra changes made to this file must be comitted to /build/controllers/MimeTypeController.php

0 commit comments

Comments
 (0)