Direct numerical simulations are performed of gravity-current fronts in the lock-exchange configuration. The case of small density differences is considered, where the Boussinesq approximations can be adopted. The key objective of the investigation is a detailed analysis of the flow structure at the foremost part of the front, where no previous high-resolution data were available. For the simulations, high-order numerical methods are used, based on spectral and spectral-element discretizations and compact finite differences. A three-dimensional simulation is conducted of a front spreading along a no-slip boundary at a Reynolds number of about 750. The simulation exhibits all features typically observed in experimental flows near the gravity-current head, including the lobe-and-cleft structure at the leading edge. The results reveal that the flow topology at the head differs from what has been assumed previously, in that the foremost point is not a stagnation point in a translating system. Rather, the stagnation point is located below and slightly behind the foremost point in the vicinity of the wall. The relevance of this finding for the mechanism behind the lobe-and-cleft instability is discussed. In order to explore the high-Reynolds-number regime, and to assess potential Reynolds-number effects, two-dimensional simulations are conducted for Reynolds numbers up to about 30 000, for both no-slip and slip (i.e. shear-stress free) boundaries. It is shown that although quantitative Reynolds-number effects persist over the whole range examined, no qualitative changes in the flow structure at the head can be observed. A comparison of the two-dimensional results with laboratory data and the three-dimensional simulation provides evidence that a two-dimensional model is able to capture essential features of the flow at the head. The simulations also show that for the free-slip case the shape of the head agrees closely with the classical inviscid theory of Benjamin.