Upper estimates of the length of a curve in a Riemannian manifold with boundary