  Recently, Fossati et al. observed that the UV transit of WASP-12b showed an
early ingress compared to the optical transit. We suggest that the resulting
early ingress is caused by a bow shock ahead of the planetary orbital motion.
In this Letter we investigate the conditions that might lead to the formation
of such a bow shock. We consider two scenarios: (1) the stellar magnetic field
is strong enough to confine the hot coronal plasma out to the planetary orbit
and (2) the stellar magnetic field is unable to confine the plasma, which
escapes in a wind. In both cases, a shock capable of compressing plasma to the
observed densities will form around the planet for plasma temperatures T < (4 -
5) x 10^6 K. In the confined case, the shock always forms directly ahead of the
planet, but in the wind case the shock orientation depends on the wind speed
and hence on the plasma temperature. For higher wind temperatures, the shock
forms closer to the line of centers between the planet and the star. We
conclude that shock formation leading to an observable early UV ingress is
likely to be a common feature of transiting systems and may prove to be a
useful tool in setting limits on planetary magnetic field strengths Bp. In the
case of WASP-12b, we derive an upper limit of about Bp=24 G.
