Discontinuous boundary conditions and the Dirichlet problem