Hamza bin Amr al-Aslami asked the Messenger of Allah ﷺ about fasting while traveling, as he was someone who fasted continuously.The Messenger of Allah ﷺ replied, "If you wish, fast, and if you wish, break your fast."
حدثنا هارون بن إسحق الهمداني عن عبدة بن سليمان عن هشام بن عروة عن أبيه
أن حمزة بن عمرو الأسلمي سأل رسول الله ﷺ عن الصوم في السفر وكان يسرد الصوم فقال رسول الله ﷺ إن شئت فصم وإن شئت فأفطر
[Its chain of transmission is sahih] Nasai reported it (4/188, no. 2310) from the hadith of Abdah through this route, and Bukhari (no. 1943) and Muslim (no. 1121) narrated it from the hadith of Hisham through this route.On this topic, there are also reports from Anas bin Malik [Bukhari, no. 1947, and Muslim, 1118], Abu Saeed [coming up: 712, 713], Abdullah bin Masud [Ahmad, 1/402, 407], Abdullah bin Amr [Ahmad, 2/174, and coming up in abridged form: 1883], Abu Darda [Bukhari, no. 1945, and Muslim, no. 1122], and Hamza bin Amr Aslami [Bukhari, no. 1942, and Muslim, 1121].