ap_os_canonical_filename — convert a filename to its canonical form
char *ap_os_canonical_filename(pool *pPool, const char *szFile)
Returns a canonical form of a filename. This is needed because some operating systems will accept more than one string for the same file. Win32, for example, is case blind, ignores trailing dots and spaces, and so on.[3] This function is generally used before checking a filename against a pattern or other similar operations.
[3] In fact, exactly what Windows does with filenames is very poorly documented and is a seemingly endless source of security holes.