The link below is to an article that looks at the lead up to World War I and in this particular article, Colonel Alfred Redl of Austria and the associated scandal concerning him.
For more visit:
http://mentalfloss.com/article/50760/world-war-i-centennial-gay-spy-scandal-rocks-vienna