حَدَّثَنَا نَصْرُ بْنُ عَلِيٍّ الْجَهْضَمِيُّ، حَدَّثَنَا سَعِيدُ بْنُ عَامِرٍ، عَنْ هَمَّامٍ، عَنْ أَبِي غَالِبٍ، قَالَ رَأَيْتُ أَنَسَ بْنَ مَالِكٍ صَلَّى عَلَى جِنَازَةِ رَجُلٍ فَقَامَ حِيَالَ رَأْسِهِ فَجِيءَ بِجِنَازَةٍ أُخْرَى بِامْرَأَةٍ فَقَالُوا يَا أَبَا حَمْزَةَ صَلِّ عَلَيْهَا ‏.‏ فَقَامَ حِيَالَ وَسَطِ السَّرِيرِ فَقَالَ لَهُ الْعَلاَءُ بْنُ زِيَادٍ يَا أَبَا حَمْزَةَ هَكَذَا رَأَيْتَ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ قَامَ مِنَ الْجِنَازَةِ مُقَامَكَ مِنَ الرَّجُلِ وَقَامَ مِنَ الْمَرْأَةِ مُقَامَكَ مِنَ الْمَرْأَةِ قَالَ نَعَمْ ‏.‏ فَأَقْبَلَ عَلَيْنَا فَقَالَ احْفَظُوا ‏.‏

It wasnarrated that Abu Ghalib said: “I saw Anas bin Malik offeringthefuneral prayer for a man, and he stood level with his head. Thenanother funeral was brought, that of a woman, and they said: ‘O AbuHamzah! Offer the funeral prayer for her.’ So he stood level withthemiddle of the bed (the body was upon). ‘Ala’ bin Ziyad saidto him: ‘OAbu Hamzah! Is this how you saw the Messenger of Allah(PBUH) standingin relation to the body of a man and a woman as youhave stood?’ Hesaid: ‘Yes.’ Then he turned to us and said:‘Remember this.’” Translation Not Available

Book Ref: Sunan Ibn Majah Book 6 Hadith 1494
Web Ref:  Sunan Ibn Majah Vol 1 Book 6 Hadith 1494