Language:
كتاب الصلاة
8  
Prayers (Salat)
(39)
Chapter: If the spit or sputum comes out suddenly then one should spit in the corner of one's garnet
(39)
باب إِذَا بَدَرَهُ الْبُزَاقُ فَلْيَأْخُذْ بِطَرَفِ ثَوْبِهِ
Sahih al-Bukhari 417

Narrated Anas:

The Prophet (ﷺ) saw expectoration (on the wall of the mosque) in the direction of the Qibla and scraped it off with his hand. It seemed that he disliked it and the sign of disgust was apparent from his face. He said, "If anyone of you stands for the prayer, he is speaking in private to his Lord, (or) his Lord is between him and his Qibla, therefore he should not spit towards his Qibla, but he could spit either on his left or under his foot." Then he took the corner of his sheet and spat in it, folded it and said, "Or do this."

حَدَّثَنَا مَالِكُ بْنُ إِسْمَاعِيلَ، قَالَ حَدَّثَنَا زُهَيْرٌ، قَالَ حَدَّثَنَا حُمَيْدٌ، عَنْ أَنَسٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم رَأَى نُخَامَةً فِي الْقِبْلَةِ فَحَكَّهَا بِيَدِهِ، وَرُئِيَ مِنْهُ كَرَاهِيَةٌ ـ أَوْ رُئِيَ كَرَاهِيَتُهُ لِذَلِكَ وَشِدَّتُهُ عَلَيْهِ ـ وَقَالَ ‏"‏ إِنَّ أَحَدَكُمْ إِذَا قَامَ فِي صَلاَتِهِ فَإِنَّمَا يُنَاجِي رَبَّهُ ـ أَوْ رَبُّهُ بَيْنَهُ وَبَيْنَ قِبْلَتِهِ ـ فَلاَ يَبْزُقَنَّ فِي قِبْلَتِهِ، وَلَكِنْ عَنْ يَسَارِهِ أَوْ تَحْتَ قَدَمِهِ ‏"‏‏.‏ ثُمَّ أَخَذَ طَرَفَ رِدَائِهِ فَبَزَقَ فِيهِ، وَرَدَّ بَعْضَهُ عَلَى بَعْضٍ، قَالَ ‏"‏ أَوْ يَفْعَلُ هَكَذَا ‏"‏‏.‏
Reference : Sahih al-Bukhari 417
In-book reference : Book 8, Hadith 67
USC-MSA web (English) reference : Vol. 1, Book 8, Hadith 409
  (deprecated numbering scheme)