Abu Ghalib (may Allah have mercy on him) said: I went to Anas (may Allah be pleased with him). He prayed the funeral prayer over a man and stood by his head. Then the bier of a woman from Quraysh was brought, and he stood at about the middle of the bier and prayed over her. Among those attending the funeral was al-Ala' bin Ziyad al-Adawi (may Allah have mercy on him). When he saw the difference in where he stood, he said: "O Abu Hamzah! Is this how the Messenger of Allah (peace and blessings be upon him) used to stand for a man and for a woman, just as you stood?" He said: "Yes!" Then al-Ala' (may Allah have mercy on him) turned to us and said: "Memorise this."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6922