Language:
كتاب العمل فى الصلاة
21  
Actions while Praying
(12)
Chapter: Blowing and splitting while in As-Salat (the Prayer)
(12)
باب مَا يَجُوزُ مِنَ الْبُصَاقِ وَالنَّفْخِ فِي الصَّلاَةِ
Sahih al-Bukhari 1213

Narrated Ibn `Umar:

The Prophet (ﷺ) saw some sputum on the wall facing the Qibla of the mosque and became furious with the people of the mosque and said, "During the prayer, Allah is in front of everyone of you and so he should not spit (or said, 'He should not expectorate')." Then he got down and scratched the sputum with his hand. Ibn `Umar said (after narrating), "If anyone of you has to spit during the prayer, he should spit to his left."

حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، حَدَّثَنَا حَمَّادٌ، عَنْ أَيُّوبَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ أَنَّ النَّبِيَّ صلى الله عليه وسلم رَأَى نُخَامَةً فِي قِبْلَةِ الْمَسْجِدِ، فَتَغَيَّظَ عَلَى أَهْلِ الْمَسْجِدِ وَقَالَ ‏ "‏ إِنَّ اللَّهَ قِبَلَ أَحَدِكُمْ، فَإِذَا كَانَ فِي صَلاَتِهِ، فَلاَ يَبْزُقَنَّ ـ أَوْ قَالَ ـ لاَ يَتَنَخَّمَنَّ ‏"‏‏.‏ ثُمَّ نَزَلَ فَحَتَّهَا بِيَدِهِ‏.‏ وَقَالَ ابْنُ عُمَرَ ـ رضى الله عنهما ـ إِذَا بَزَقَ أَحَدُكُمْ فَلْيَبْزُقْ عَلَى يَسَارِهِ‏.‏
Reference : Sahih al-Bukhari 1213
In-book reference : Book 21, Hadith 17
USC-MSA web (English) reference : Vol. 2, Book 22, Hadith 304
  (deprecated numbering scheme)