كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
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 554 a

Abdullah b. Shakhkhir reported on the authority of his father that he said:

I said prayer with the Messenger of Allah (ﷺ) and saw him spitting and rubbing it off with his shoe.
حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ الْعَنْبَرِيُّ، حَدَّثَنَا أَبِي، حَدَّثَنَا كَهْمَسٌ، عَنْ يَزِيدَ بْنِ عَبْدِ اللَّهِ بْنِ الشِّخِّيرِ، عَنْ أَبِيهِ، قَالَ صَلَّيْتُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم فَرَأَيْتُهُ تَنَخَّعَ فَدَلَكَهَا بِنَعْلِهِ ‏.‏
Reference : Sahih Muslim 554a
In-book reference : Book 5, Hadith 72
USC-MSA web (English) reference : Book 4, Hadith 1127
  (deprecated numbering scheme)