If E=MC2 and the speed of light slows down when passing through a medium such as water or the earths atmosphere then the photon should gradually gain mass as it slows it's velocity. and if a stars atmosphere such as the gas it's giving off or even its magnetic field could be considered a medium, then the photon should slow down and gain mass and gravity would begin to pull on it, therefor bending light.~
