It is a well known result of the special theory of relativity that the photon has no rest mass, because for a particle to attain the speed of light, it must have zero rest-mass. I will not dig into this more, but the interested reader can see these questions for more information:
How can a photon have no mass and still travel at the speed of light?
Why can't photons have a mass?
Also, this Wikipedia link:
http://en.wikipedia.org/wiki/Photon#Experimental_checks_on_photon_mass
Now my question is what about a photon in non-empty space? It is well known that light in non-empty spaces travel slightly slower than its speed in empty space. But that means that the photon cannot have zero rest mass, as every mass-less particle should always attain the speed of light (see the links above)! How can this be explained?
Let us assume for the moment that the answer to this question is that the the photon does indeed have an extremely small mass in non-empty spaces. But let's direct a ray of light towards a box of glass which is completely empty. Now before it reaches the empty space inside the box, it has velocity c - $\epsilon$, where $\epsilon$ is some small positive real number. Once it enters the empty space, it should raise to the the exact speed of light. However, it is a result of special relativity that any particle with a non-zero mass, however small it is, cannot attain the speed of light.
Couldn't this mean that the photon does indeed have a mass, but a very very small one, and that it is actually moving in a speed less than the universal maximum limit of speed?!