Any massive object creates a gravitational field that curves space time. Light follows the shortest path through that space time according to the principle of least actions. Therefore, massive object bents space time and light follows the shortest path through that space time.