When using the give command to give the player a bow with infinity on it, it gives a bow with protection. I tried the exact same command in MC 1.7.9, and it gave me a bow with infinity, which means I did not type the command wrong.
Here is the command I used-
/give @p minecraft:bow 1 0 {ench:[{id:51.lvl:1}]}
You need to change the period between 51 and lvl to a comma