<!--
	Buckets:
	s3.amazonaws.com/assets.tumblr.com/
	s3.amazonaws.com/data.tumblr.com/
	s3.amazonaws.com/static.tumblr.com/
	gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/

-->
<ruleset name="Tumblr (partial)">

	<target host="tumblr.com" />
	<target host="*.tumblr.com" />
	<target host="secure.assets.tumblr.com" />
	<target host="*.media.tumblr.com" />
		<!--
			Doesn't work when rewritten.
							-->
		<exclusion pattern="^https?://assets\.tumblr\.com/javascript/tiny_mce_3_4_7/themes/advanced/source_editor\.htm" />


	<rule from="^http://(www\.)?tumblr\.com/($|login|photo/)"
		to="https://$1tumblr.com/$2" />

	<!--	Amazon only works for a subset of assets data.
		The pattern for that subset is a mystery.
		Forget being kind and just do what works.

		https://mail1.eff.org/pipermail/https-everywhere-rules/2012-May/001149.html

		swf: https://mail1.eff.org/pipermail/https-everywhere-rules/2012-April/001095.html

			-->

        <!--    Right now some jk links such as "https://secure.assets.tumblr.com/javascript/tiny_mce_3_4_7/themes/advanced/link.htm?1074"
             are causing problems (see https://trac.torproject.org/projects/tor/ticket/7705). Moved the "assets" rule below :to Tumblr-mismatches.xml

	<rule from="^https?://(?:secure\.)?assets\.tumblr\.com/"
		to="https://secure.assets.tumblr.com/" />
           -->

	<rule from="^https?://(?:data|(?:\d+\.)?media)\.tumblr\.com/"
		to="https://gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/" />

	<rule from="^https?://static\.tumblr\.com/"
		to="https://s3.amazonaws.com/static.tumblr.com/" />

</ruleset>
