Drupal 6 Core Patch for allowing CSS optimization with private files

If you've ever built a large website that requires private files, then you've probably run into this before. In Drupal 6 the CSS optimization requires that the files be stored publicly. This is a known bug that will not be fixed according to the drupal developers.

Normally, this wouldn't be a problem, but IE refuses to allow more than 31 linked stylesheets, and each drupal module adding its own css file, it quickly becomes obvious that you need the CSS to be compressed into a single file. In my attempts, I tried a lot of different fixes including other CSS optimization contributed modules and a custom module of my own, but ultimately each of these solutions leaves something to be desired.

Sadly, the best solution for this issue is to hack (patch) core. Thankfully, someone has already done the hard work.