Sunan an-Nasa'i, Book 22, Hadith 203 (Nasa'i 2297)

It was narrated that Al-'Awwam bin Hawshab said:

"I said to Mujahid: 'What about fasting while traveling?' He said: 'The Messenger of Allah used to fast (sometimes) and not fast (sometimes)."'