Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:1200[Chain 1] Abū Ṭāhir al-Faqīh > Abū Bakr al-Qaṭṭān > Aḥmad b. Yūsuf al-Sulamī > Qabīṣah [Chain 2] Abū al-Ḥasan b. ʿAbdān > Aḥmad b. ʿUbayd al-Ṣaffār > Muḥammad b. al-Faḍl b. Jābir > Zakariyyā b. al-Ḥakam al-Rāsibī > al-Firyābī > Sufyān > Ḥumayd > Anas

[Machine] The Messenger of Allah ﷺ spat on his garment while he was in prayer, meaning he recited the Hadith of Al-Firiyabi and in the Hadith of Qabisa it is mentioned that the Messenger of Allah ﷺ spat on his garment.  

البيهقي:١٢٠٠أَخْبَرَنَا أَبُو طَاهِرٍ الْفَقِيهُ أنا أَبُو بَكْرٍ الْقَطَّانُ نا أَحْمَدُ بْنُ يُوسُفَ السُّلَمِيُّ ثنا قَبِيصَةُ ح وَأَخْبَرَنَا أَبُو الْحَسَنِ بْنُ عَبْدَانَ أنا أَحْمَدُ بْنُ عُبَيْدٍ الصَّفَّارُ حَدَّثَنِي مُحَمَّدُ بْنُ الْفَضْلِ بْنِ جَابِرٍ أنا زَكَرِيَّا بْنُ الْحَكَمِ الرَّاسِبِيُّ ثنا الْفِرْيَابِيُّ قَالَا ثنا سُفْيَانُ عَنْ حُمَيْدٍ عَنْ أَنَسٍ قَالَ

بَزَقَ رَسُولُ اللهِ ﷺ فِي ثَوْبِهِ يَعْنِي وَهُوَ فِي الصَّلَاةِ لَفْظُ حَدِيثِ الْفِرْيَابِيِّ وَفِي حَدِيثِ قَبِيصَةَ أَنَّ رَسُولَ اللهِ ﷺ بَزَقَ فِي ثَوْبِهِ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنِ الْفِرْيَابِيِّ