Both of those molecular pathways play roles in fighting infections, and they have counterparts in humans and other mammals. The researchers found that the imd pathway continued to work as it should for the flies that were raised in space. However, the receptor that controlled the Toll pathway ceased to function.

"That receptor is somehow not signaling the response for fungal infections," Deborah Kimbrell, a biologist at the University of California at Davis who led the study team, told NBC News.

The link between gravity and the immune system was reinforced by experiments conducted in a centrifuge on Earth. Kimbrell and her colleagues found that normal flies actually had higher resistance to fungal infections when they were subjected to a stronger-than-normal gravitational pull. But they saw no difference for fruit flies with the "yuri gagarin" mutation, which leaves them without normal responses to gravitational fields. ("Yuri gagarin" refers to the Soviet cosmonaut who became the first human in space in 1961.)

Related to stress?How does zero gravity interfere with the Toll-like receptor? There's no clear answer to that question yet, but the researchers noticed that space-raised flies showed higher expression of genes that produce stress-related proteins. It could be that those proteins gum up the receptors, or that zero gravity interferes with the way proteins behave outside the cell.

Further insights could come from the Fruit Fly Lab, an experiment that's due to be delivered to the space station this year aboard a SpaceX Falcon cargo capsule.

The space station's long-term human residents already spend a lot of time doing resistance exercises to guard against bone and muscle loss — but the researchers say even more could be done to simulate gravity's effect. "There should be centrifuges for human space travel," Kimbrell told NBC News.

The better-than-normal immune response seen in fruit flies that were spun in a high-G centrifuge also suggests a health tip for us humans here on Earth. "It might be helpful for the immune response to spend a little time on a carnival ride," Kimbrell joked.