Anas bin Malik reported,

He saw some phlegm on the qiblah wall of the mosque, and it troubled him so much that the displeasure could be seen on his face. He scraped it off and said, "When one of you," or, "when a person stands to pray, he is conversing privately with his Lord عز وجل," or, "his Lord is between him and the qiblah. So if he must spit, let him spit to his left or under his foot." Then he gestured like this, as though spitting into his garment.He said, We used to ask Humayd about this, and he would say, "Glory be to Allah! Who do you think it was?" meaning the Prophet ﷺ, without telling us anything more.

Ahmad 12959

Sahih

حدثنا محمد بن عبد الله بن المثنى حدثنا حميد

عن أنس قال

رأى نخامة في قبلة المسجد فشق عليه حتى عرف ذاك في وجهه فحكه وقال إن أحدكم أو المرء إذا قام إلى الصلاة فإنه يناجي ربه عز وجل أو ربه بينه وبين القبلة فليبزق إذا بزق عن يساره أو تحت قدمه وأومأ هكذا كأنه في ثوبه قال وكنا نقول لحميد فيقول سبحان الله من هو يعني النبي ﷺ ولا يزيدنا عليه

أحمد 12959صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 12959
Ahmad 12959