viruses are transfered thru touching, the hands, the mouth so if a person was sick and getting that close to u thye can pass the viruse or bacteriaum that way. so the act of sex in it self does not but due to the fact u have close encounter with the other person opens you up 100 % to passing on what they have.
however if you have a strong immune system and have been exposed to the virus lately and have a immunity to it u maight not catch it any way.
If someone is sick and you don't want to get sick, don't have sex with them. If I'm not mistaken, anything that's normally contagious (like you could catch it from someone sneezing on you, sharing a cup, kissing) can be spread through sex.