99 Sportsman Brake system

When I squeeze the hand lever, brake fluid squirts out of my slave cap under the seat. I have heard about a valve in either the caliper or the rear master cylinder that keeps the hand lever and foot pedal from working against one another. What component is bad that is allowing this to happen? When I press the foot pedal, the hand lever gets firmer, when I pull the hand lever, it pushes up on the foot pedal. I pulled the caliper apart and it seems to clear and operating properly, is this in the rear master cylinder?

Thanks!