Sunan Ibn Majah, Book 4, Hadith 29 (In-Book) ⓘ
It was narrated that 'Abdullah bin 'Umar said: "The Messenger of Allah saw some sputum in the prayer direction of the mosque, when he was praying in front of the people. He scratched it off, then when the prayer was over, he said: 'When anyone of you is performing prayer, Allah is before him, so none of you should spit toward the front while praying.'"
حَدَّثَنَا مُحَمَّدُ بْنُ رُمْحٍ الْمِصْرِيُّ، أَنْبَأَنَا اللَّيْثُ بْنُ سَعْدٍ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، قَالَ رَأَى رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ نُخَامَةً فِي قِبْلَةِ الْمَسْجِدِ وَهُوَ يُصَلِّي بَيْنَ يَدَىِ النَّاسِ فَحَتَّهَا ثُمَّ قَالَ حِينَ انْصَرَفَ مِنَ الصَّلاَةِ " إِنَّ أَحَدَكُمْ إِذَا كَانَ فِي الصَّلاَةِ كَانَ اللَّهُ قِبَلَ وَجْهِهِ فَلاَ يَتَنَخَّمَنَّ أَحَدُكُمْ قِبَلَ وَجْهِهِ فِي الصَّلاَةِ " .
also referenced under: Hadith 763 (Reference) & Volume 1, Book 4, Hadith 763 (DarusSalam)