A gay man in Missouri said his coworkers called him a "cocksucker." They asked him if he had AIDS. They harassed him for having a boyfriend, and made fun of him when he and his boyfriend broke up. And he was ultimately fired.

But, as ThinkProgress's Zack Ford reported, the Western District Missouri Court of Appeals on Tuesday decided this was all totally legal, and dismissed James Pittman's lawsuit against his former employer, Cook Paper Recycling Corp. "Because the Missouri Human Rights Act does not prohibit discrimination on the basis of sexual orientation," the court's majority concluded, "we affirm the circuit court's judgment dismissing Pittman’s petition for failure to state a claim."

To be clear, this would all be explicitly illegal if Pittman was black or a woman and his coworkers mocked him and his employer fired him over his race or sex. But Missouri doesn't have explicit legal workplace protections for sexual orientation. And Missouri is not alone — the federal government and 27 other states don't have such laws.

Most states don't shield workers from discrimination based on sexual orientation or gender identity

Most states don't ban discrimination based on sexual orientation and gender identity in the workplace, housing, or public accommodations (hotels, restaurants, and other places that serve the general public).

As a result, more than half of LGBTQ Americans, according to the advocacy group Movement Advancement Project, live in a state where, under state law, an employer can legally fire someone because he's gay, a landlord can legally evict someone because she's lesbian, and a hotel manager can legally deny service to someone who's transgender — for no reason other than the person's sexual orientation or gender identity.

Currently, 19 states ban at least some forms of discrimination based on sexual orientation and gender identity, while three additional states ban discrimination based on sexual orientation. Some other states protect public but not private employees from discrimination. Many municipalities have nondiscrimination laws that only apply within their local borders, even in states that don't have such laws. And some companies prohibit discrimination in their own policies.

The protections vary from state to state. Massachusetts's protections for gender identity and Utah's protections for sexual orientation and gender identity don't apply to public accommodations. Some states also include exemptions for discrimination based on religious grounds. Enforcement varies, as well: Depending on the state, private lawsuits, fines, and jail time are all possible forms of punishment for discrimination.

But advocates argue existing legal protections should already protect LGBTQ workers

Although LGBTQ people aren't explicitly included in most state and federal nondiscrimination laws, some advocates say existing law does actually protect workers from discrimination based on sexual orientation and gender identity. They argue that the Civil Rights Act's — and the Missouri Human Rights Act's — existing protections for sex cover LGBTQ people, since discrimination against someone's sexual orientation or gender identity is rooted in the person's sex.

"It's pretty uncontroversial that discriminating against a man that acts too effeminate or a woman that acts too masculine is a form of sex discrimination," the ACLU's Joshua Block previously told me. "That applies to lesbians and gay men, too."

This isn't a fringe position — it was adopted by the Equal Employment Opportunity Commission, a federal agency that enforces civil rights laws against discrimination in the workplace.

But two of three judges on the Missouri court rejected this argument, citing the dictionary:

The plain language of the Missouri Human Rights Act is clear and unambiguous. Employers cannot discriminate against employees on the basis of their "sex." The clear meaning prohibiting discrimination based upon "sex" under the Missouri Human Rights Act intended by the Missouri legislature concerns discrimination based upon a person’s gender and has nothing to do with sexual orientation. Indeed, the first definition of "sex" provided by Webster’s Third New International Dictionary is "one of the two divisions of human beings respectively designated male or female."

Still, one of the three judges said the majority of the court was wrong, citing other parts of the same dictionary to show the definition of sex really can cover sexual orientation:

(2) the sum of the morphological, physiological, and behavioral peculiarities of living beings that subserves biparental reproduction; (3) the sphere of interpersonal behavior especially between male and female most directly associated with, leading up to, substituting for, or resulting from genital union; and (4) the phenomena of sexual instincts and their manifestations.

But the majority of the court disagreed, stating that the law doesn't cover Pittman's complaint. That underlines just how important explicit legal protections are: Without them, judges may have enough room for interpretation to allow the most abhorrent discrimination against LGBTQ workers to continue.