Index: xmlrpc.php
===================================================================
--- xmlrpc.php	(revision 11681)
+++ xmlrpc.php	(working copy)
@@ -57,6 +57,21 @@
 // Turn off all warnings and errors.
 // error_reporting(0);
 
+// Redirect to HTTPS if FORCE_SSL_ADMIN or FORCE_SSL_LOGIN is true
+$secure = false;
+if ( is_ssl( ) || force_ssl_admin( ) || force_ssl_login( ) )
+	$secure = true;
+
+if ( $secure && !is_ssl( ) ) {
+	if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
+		wp_redirect( preg_replace( '|^http://|',  'https://', $_SERVER['REQUEST_URI'] ) );
+		exit( );
+	} else {
+		wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
+		exit( );
+	}
+}
+
 /**
  * Posts submitted via the xmlrpc interface get that title
  * @name post_default_title
