The Book of Prayers (Kitab Al-Salat)

Muslim :: Book 4 : Hadith 1038

Masruq reported: It was mentioned before'A'isha that prayer is invalidated (in case of passing) of a dog, an ass and a woman (before the worshipper, when he is not screened). Upon this 'A'isha said: You likened us to the asses and the dogs. By Allah I saw the Messenger of Allah (may peace be upon him) saying prayer while I lay on the bedstead interposing between him and the Qibla. When I felt the need, I did not like to wit to front (of the Holy Prophet) and perturb the Messenger of Allah (may peace be upon him) and quietly moved out from under its (i. e. of the bedstead) legs.

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star