Sunan an-Nasa'i, Book 22, Hadith 169 (Nasa'i 2263)

Jabir bin 'Abdullah narrated that:

the Messenger of Allah passed by a man in the shade of a tree on whom water was being sprinkled. He said: "What is the matter with your companion?" They said: "O Messenger of Allah, he is fasting." He said: "It is not righteousness to fast when traveling. Take to the concession which Allah has granted you, accept it."