Duality in the flat cohomology of curves