I do not think pepper spray would have had any effect. At best, the dog would have felt the effects of the spray 10 or 15 seconds after it had landed on me.
Having been there, done that, (except for actually shooting at a dog) I can tell you that pepper spray would have bought you a few extra seconds. You could have simply deployed the spray as you side stepped away from the dog.
True, pepper spray is not the solution but it can buy you a little bit of time.
A good swift kick may have been a good idea as well. An animal that is charging has a tough time changing course at the last second.
The dog you described would, in my humble yet amateur opinion, have been trained to attack like this. An instinctual attack would have led the dog to try and attack from behind.