The Messenger of Allah ﷺ said, "Do not stop to rest on the main roads, nor relieve yourselves on them."
حدثنا أبو بكر بن أبي شيبة حدثنا يزيد بن هارون أنبأنا هشام عن الحسن
قال رسول الله ﷺ لا تنزلوا على جواد الطريق ولا تقضوا عليها الحاجات
[Its chain of transmission is daif] Reference: Abu Dawud narrated it in jihad, chapter on hastening the journey and the prohibition of resting overnight on the road, no. 2570, from the hadith of Yazid, in a shortened form.Hasan did not hear from Jabir, as Ibn Madini stated (Jami Tahsil, no. 163). He was a mudallis, and he narrated using "an" (without specifying direct hearing). An explicit statement of his hearing from Jabir appears in Ibn Khuzayma, no. 2548, but the chain leading to it is daif, no. 329.