A straight line is 'In the eye of the beholder'. As far as light is concerned it travels in a straight line from point A to point B. However, for a distant observer the trajectory may be a bit curved. The reason is that the geometry of space is a bit warped near a massive gravitational source like a black hole or even the sun. One example of that is the verification of Einstein's theory of light from a distant star being bent by the sun's gravitational potential. This was observed in 1919 during an eclipse of the sun.
The general phenomenon is called 'Geodesic lines in curved spaces'.
As a simple example in our spherical geometry of the earth, the latitudes of New York and Rome are very similar. But the shortest distance between them for an airplane is not on a direct east-west route but to travel a bit to the north-east for a while then curve back south. If you stretch a string on a globe between these two points you find that the optimum flight trajectory takes you about 10 degrees north of the direct east-west flight path.
Gravity also acts as a distortion of space, however the mathematics is a bit more complicated.
LeeH
(published on 11/20/2010)