during the First World War how did the flamethrowers work and if they were shot would they explode.
According to the patent of said flamethrower, the flamethrower, or "apparatus for producing long jets of flames," had two portable tanks on the back. One was filled with a combustible liquid and the other was filled with a gas. Both need to be combined to actually combust.
If this apparatus is carried by a soldier who has to march and jump about, the combustible liquid absorbs a certain quantity of the gases whereby the pressure in the reservoir is considerably reduced so that it is no longer sufficient to produce the long jet of liquid. In order to prevent this inconvenience the direct contact of the gases with the combustible liquid is preferably prevented... A partition is fixed in the reservoir somewhat above the level of the combustible liquid. Theis partition has a small hole through which the gas acts upon the liquid. The liquid is thus separated from the gas so that it cannot admix with the same.
The liquid and gas only combust after reaching the, "an igniting device fixed on said nozzle so that it can ignite the combustible liquid flowing out of said nozzle, means for automatically lighting said device when said stop-cock is being opened." Essentially, you have two cans, one with a liquid and one with a gas, that combine only when activated and ignited by an ignition device.