Photons don't have mass. They are not affected by gravity as such, but they follow a straight path in curved space, the space being curved by...
Separate names with a comma.