On the Response of the Upper Atmosphere to Solar Flares.