كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(13)
Chapter: The prohibition of spitting in the masjid, during prayer and at other times. The prohibition of a praying person spitting in front of him or to his right
(13)
باب النَّهْىِ عَنِ الْبُصَاقِ، فِي الْمَسْجِدِ فِي الصَّلاَةِ وَغَيْرِهَا ‏‏
Sahih Muslim 547 a

Abdullah b. Umar reported:

The Messenger of Allah (ﷺ) saw spittle on the wall towards Qibla, and scratched it away and then turning to the people said: When any one of you prays, he must not spit in front of him, for Allah is in front of him when he is engaged in prayer.
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى التَّمِيمِيُّ، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم رَأَى بُصَاقًا فِي جِدَارِ الْقِبْلَةِ فَحَكَّهُ ثُمَّ أَقْبَلَ عَلَى النَّاسِ فَقَالَ ‏ "‏ إِذَا كَانَ أَحَدُكُمْ يُصَلِّي فَلاَ يَبْصُقْ قِبَلَ وَجْهِهِ فَإِنَّ اللَّهَ قِبَلَ وَجْهِهِ إِذَا صَلَّى ‏"‏ ‏.‏
Reference : Sahih Muslim 547a
In-book reference : Book 5, Hadith 61
USC-MSA web (English) reference : Book 4, Hadith 1116
  (deprecated numbering scheme)