Alan Shepard infamously urinated in his spacesuit on the launchpad. His flight was supposed to be short, so nobody thought that he might have to go during the mission. In the following space missions, NASA experimented with various urine-collecting contraptions (double rubber underwear,...).
The Vostok 1 flight was much longer than that of Freedom 7 (108 minutes in space, instead of 15), and the Vostok 2 flight was even longer than that. How did the the early Russian crewed space missions deal with waste collection? Could Gagarin and Titov have urinated during their flight if they had to, or were they expected to go before the flight (albeit on the back wheel of the bus) and hold it in until their return?