Let $X$ be a "nice" scheme and $Z \hookrightarrow X$ closed of codimension $\geq 2$. Let $Y$ over $X \setminus Z$ be a torsor for a finite flat group scheme $G/X$.


Does $Y$ spread out to a $G$-torsor over the whole of $X$?


For $G/X$ finite étale one can use Zariski-Nagata purity to spread $Y$ out to a scheme and then [Szamuely, Galois Groups and Fundamental Groups], p. 171, Lemma 5.3.13 to show that the extension is in fact a $G$-torsor.



purity for finite flat group schemes
It is true if $X$ is regular. This is stated (as Lemme 2) in my CRAS 1985 note on purity for families of curves:  

<http://gallica.bnf.fr/ark:/12148/bpt6k5495813c/f45.image>  

where, unfortumately, the proof is missing (I only claim that it extends Auslander's proof of the étale case). 


