It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) was on a journey when he passed by a woman who had let her hair hang loose. He (peace and blessings be upon him) asked: "What is this?" It was said: This is so-and-so, a woman of Quraysh; she vowed that she would perform Hajj with her hair hanging loose. He (peace and blessings be upon him) said: "Order her to cover her head."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11822