(a) It is narrated from Ubadah bin al-Walid bin Ubadah bin al-Samit: We came to Jabir bin Abdullah (may Allah be pleased with them both) in his mosque. He related: We were present with the Messenger of Allah (peace and blessings be upon him) in the mosque. In his (peace and blessings be upon him) hand was a palm stalk of the kind called Ibn Tab. He (peace and blessings be upon him) looked around and saw phlegm on the qiblah side of the mosque, and he (peace and blessings be upon him) scraped it off with the stalk. Then he (peace and blessings be upon him) said: "Which of you would like Allah Almighty to turn His face away from him?" We became fearful. He (peace and blessings be upon him) said: "Which of you would like Allah to turn His face away from him?" We said: O Messenger of Allah! None of us would like that. He (peace and blessings be upon him) said: "When any one of you prays, Allah Almighty is in front of him, so no one should spit in front of him or to his right; rather, let him spit to his left, under his foot. If phlegm comes suddenly, then let him do like this with his garment." Then he (peace and blessings be upon him) rubbed his garment together and said: "Bring some 'abir perfume." A young man of the tribe got up, ran to his home and came back with khaluq perfume in his palm. The Messenger of Allah (peace and blessings be upon him) took the perfume, put it on the tip of the stalk, then applied it to the trace of the phlegm.
(b) Jabir (may Allah be pleased with them both) said: It is on this basis that you apply perfume in the mosques.
(c) In the narration of Harun bin Ma'ruf it is: "Let him spit to his left, under his left foot."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3606