Torsors on the complement of a smooth divisor