Sayyiduna Hudhayfah (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) said: "When any of you spits in the mosque, he should not spit to his right; rather, he should spit to his left or beneath his foot."
Al-Bazzar recorded it, and its narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 2004