Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1244
diff -u -p -r1.1244 common.inc
--- includes/common.inc	21 Oct 2010 19:31:39 -0000	1.1244
+++ includes/common.inc	9 Nov 2010 14:47:42 -0000
@@ -2798,6 +2798,11 @@ function drupal_add_css($data = NULL, $o
     $options = array();
   }
 
+  // Automatically detect external files.
+  if (isset($data) && url_is_external((string) $data)) {
+    $options['type'] = 'external';
+  }
+
   // Create an array of CSS files for each media type first, since each type needs to be served
   // to the browser differently.
   if (isset($data)) {
@@ -3871,6 +3876,12 @@ function drupal_add_js($data = NULL, $op
   else {
     $options = array();
   }
+
+  // Automatically detect external files.
+  if (isset($data) && url_is_external((string) $data)) {
+    $options['type'] = 'external';
+  }
+
   $options += drupal_js_defaults($data);
 
   // Preprocess can only be set if caching is enabled.
