Projet

Général

Profil

Révision b4adf10d

Ajouté par Assos Assos il y a plus de 9 ans

Udpate to 7.33

Voir les différences:

drupal7/modules/image/image.module
845 845
    }
846 846
  }
847 847

  
848
  // Confirm that the original source image exists before trying to process it.
849
  if (!is_file($image_uri)) {
850
    watchdog('image', 'Source image at %source_image_path not found while trying to generate derivative image at %derivative_path.',  array('%source_image_path' => $image_uri, '%derivative_path' => $derivative_uri));
851
    return MENU_NOT_FOUND;
852
  }
853

  
848 854
  // Don't start generating the image if the derivative already exists or if
849 855
  // generation is in progress in another thread.
850 856
  $lock_name = 'image_style_deliver:' . $style['name'] . ':' . drupal_hash_base64($image_uri);
......
854 860
      // Tell client to retry again in 3 seconds. Currently no browsers are known
855 861
      // to support Retry-After.
856 862
      drupal_add_http_header('Status', '503 Service Unavailable');
863
      drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
857 864
      drupal_add_http_header('Retry-After', 3);
858 865
      print t('Image generation in progress. Try again shortly.');
859 866
      drupal_exit();
......
875 882
  else {
876 883
    watchdog('image', 'Unable to generate the derived image located at %path.', array('%path' => $derivative_uri));
877 884
    drupal_add_http_header('Status', '500 Internal Server Error');
885
    drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
878 886
    print t('Error generating image.');
879 887
    drupal_exit();
880 888
  }

Formats disponibles : Unified diff