Skip to content

Treat all filename extensions case-insensitive #206

@danielmarschall

Description

@danielmarschall

As mentioned in #201 extensions extensions should be treated case insensitive.

I looked through the source code to find which configurable filename extensions there are, and if they are treated correctly.

Case $zipped

D:\GitHub\websvn\filedetails.php(74): if ($history && isset($zipped) && in_array($extn, $zipped) && $rep->hasReadAccess($path, false)) 
D:\GitHub\websvn\include\distconfig.php(266): // $zipped[] = '.dll';
  • Filename extensions already treated case-insensitively: Yes (because $extn is lowercase)
  • Mentioned in docs that extension configuration must be lower-case: (TODO)

Case $contentType

D:\GitHub\websvn\filedetails.php(88): // file, or from the $contentType array in setup.php.
D:\GitHub\websvn\filedetails.php(97): $setupContentType = @$contentType[$extn];
D:\GitHub\websvn\include\distconfig.php(298): // $contentType['.c'] = 'text/plain'; // Create a new association
D:\GitHub\websvn\include\distconfig.php(299): // $contentType['.doc'] = 'text/plain'; // Modify an existing one
D:\GitHub\websvn\include\distconfig.php(300): // unset($contentType['.m']); // Remove a default association
D:\GitHub\websvn\include\distconfig.php(304): // the file extension matches an entry in $contentType), you can choose to ignore
D:\GitHub\websvn\include\setup.php(60): $contentType = array(
  • Filename extensions already treated case-insensitively: Yes (because $extn is lowercase)
  • Mentioned in docs that extension configuration must be lower-case: (TODO)

Case $extEnscript

D:\GitHub\websvn\include\distconfig.php(394): // $extEnscript['.pas'] = 'pascal';
D:\GitHub\websvn\include\setup.php(191): $extEnscript = array(
D:\GitHub\websvn\include\svnlook.php(634): global $config, $extEnscript;
D:\GitHub\websvn\include\svnlook.php(640): if (array_key_exists($filename, $extEnscript)) {
D:\GitHub\websvn\include\svnlook.php(641): $lang = $extEnscript[$filename];
D:\GitHub\websvn\include\svnlook.php(642): } else if ($ext && array_key_exists($ext, $extEnscript)) {
D:\GitHub\websvn\include\svnlook.php(643): $lang = $extEnscript[$ext];

Case $extGeshi

D:\GitHub\websvn\include\distconfig.php(409): // $extGeshi['pascal'] = array('p', 'pas');
D:\GitHub\websvn\include\setup.php(263): $extGeshi = array(
D:\GitHub\websvn\include\svnlook.php(749): global $extGeshi;
D:\GitHub\websvn\include\svnlook.php(755): foreach ($extGeshi as $language => $extensions) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions