It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) saw spittle or phlegm on the qiblah side of the mosque, so I got up and scraped it off. The Messenger of Allah (peace and blessings be upon him) said: "Would any of you like it if, while he was praying, a man came and spat or put phlegm in his face?" Then he said: "When one of you is praying, let him not spit in front of him or to his right, but let him spit to his left or under his foot. If he cannot do that, then let him spit into his garment and rub it."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3592