It sounds dangerous to spit on a trained soldier.
Here is a good answer by /u/Bernardito : https://www.reddit.com/r/AskHistorians/comments/mee6s/this_has_bugged_me_for_a_while_what_is_the_key/