Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) says that the Messenger of Allah (peace and blessings be upon him) saw spittle on the qiblah wall, so he scraped it off, then turned towards the people and said: "None of you should spit towards the qiblah in prayer, nor in front of his face, for when he is praying Allah Almighty is in front of him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3602