Having a fire in space was one of the last things any astronaut would want to encounter.
After the Apollo 1 accident, NASA took a number of drastic measures to improve fire safety. They reoptimized and refitted the spacecraft's interior by replacing all flammable materials with self-extinguishing ones, insulating the piping and wires, correcting wiring problems, and changing the atmospheric pressure in the cabin–the gas in the cabin was converted from pure oxygen to an oxygen-nitrogen mix. The combustible nylon spacesuit was also exchanged for a safer fiberglass model. To top it all off, NASA fortified the astronauts with intensive firefighting training.
Fires in the spacecraft were very different from the ones on earth. Without gravity, the hot air generated by the burning flames wouldn't rise, but instead, wrap itself around the fire, forming a low oxygen, high-temperature layer.