How to fix broken file.module function 'file_ajax_progress' without hacking the core and patching after every update? When site has enabled page cache and anonymous user tries to upload a file, he cannot see upload status progress. He see only message "Starting upload...". Bug was reported in June 2012, has a working patch and I have a question: 

How to fix broken file.module function file_ajax_progress without hacking the core and patching after every update? Should I do some function override by custom module?

This is all working code together:

/**
 * Menu callback for upload progress.
 *
 * @param $key
 *   The unique key for this upload process.
 */
function file_ajax_progress($key) {
  $progress = array(
    'message' =&gt; t('Starting upload...'),
    'percentage' =&gt; -1,
  );

  $implementation = file_progress_implementation();
  if ($implementation == 'uploadprogress') {
    $status = uploadprogress_get_info($key);
    if (isset($status['bytes_uploaded']) &amp;&amp; !empty($status['bytes_total'])) {
      $progress['message'] = t('Uploading... (@current of @total)', array('@current' =&gt; format_size($status['bytes_uploaded']), '@total' =&gt; format_size($status['bytes_total'])));
      $progress['percentage'] = round(100 * $status['bytes_uploaded'] / $status['bytes_total']);
    }
  }
  elseif ($implementation == 'apc') {
    $status = apc_fetch('upload_' . $key);
    if (isset($status['current']) &amp;&amp; !empty($status['total'])) {
      $progress['message'] = t('Uploading... (@current of @total)', array('@current' =&gt; format_size($status['current']), '@total' =&gt; format_size($status['total'])));
      $progress['percentage'] = round(100 * $status['current'] / $status['total']);
    }
  }
  // Mark this page as being uncacheable.
  drupal_page_is_cacheable(FALSE);
  drupal_json_output($progress);
}
Patching core is not the same as hacking core.  Many of us have patched versions of Drupal in the wild (eg, using Secure Pages).

You need to work out how you want to manage this between upgrades.

On sites where I don't track Drupal's repo, I keep a directory of patches next to the DOCROOT.  Before I upgrade, I check on whether the patch is needed or not.  I then drush pm-update drupal and apply patches.

On sites that I have built with git, I can typically build the site in its own branch, apply patches, and then upgrade core versions by merging the latest tag and doing the database updates.