Imagine a scenario where Army A has received intel of the movement of Army B in a heavily forested area. Army A decides to spring a trap where in it sets fire to the forest encircling Army B, intending for the spread of it to boil Army B alive.
Having fallen for this trap and assuming conditions are palatable for the spread of fire, what tools would a readily equipped medieval army be capable of using to survive or reduce casualties? Would the same apply to a poorly prepared army? Are there any real world examples from any time period to draw from? Assume no substantial bodies of water nearby.