  It is a well-known fact that in a Lipschitz domain \Omega\subset R^n a
p-Hardy inequality, with weight d(x,\partial\Omega)^\beta, holds for all u\in
C_0^\infty(\Omega) whenever \beta<p-1. We show that actually the same is true
under the sole assumption that the boundary of the domain satisfies a uniform
density condition with the exponent \lambda=n-1. Corresponding results also
hold for smaller exponents, and, in fact, our methods work in general metric
spaces satisfying standard structural assumptions.
