The entropy behaviour along the Rayleigh–line process of quasi–one–dimensional (quasi–1D) gaseous detonation waves is examined using a Rankine–Hugoniot analysis. Quasi–1D detonation waves are characterized by a small fractional change in cross–sectional area across otherwise ideal 1D detonation waves (ξ). They arise, for example, in the modelling of boundary layers in the detonation of gases in tubes of finite diameter. Contrary to the current view on the problem of quasi–1D detonations with area change, where the generalized Chapman–Jouguet (CJ) condition used to close the conservation laws is the sonic outflow, the following results are obtained from the present analysis. We first show that the tangency between the Hugoniot curve and Rayleigh line of quasi–1D gaseous detonation waves can be adequately described in the [pressure, specific volume /(1+ξ)] plane. For ξ > 0, it is shown that this tangency with a positive entropy derivative along the Rayleigh line represents the end–state of a self–sustaining quasi–1D diverging detonation wave, where the entropy reaches its maximum allowable value. The corresponding downstream flow velocity is subsonic relative to the detonation front. Both the state of maximum entropy along the Rayleigh line and that of downstream sonic flow lie on the weak branch of computed entropy profiles. For ξ < 0, this tangency with a negative entropy derivative along the Rayleigh line cannot be a physically attainable state without violating the principle of the increase of entropy. The end–state of a quasi–1D self–sustaining converging detonation wave lies in the state of maximum entropy along the Rayleigh line, where the flow velocity is supersonic relative to the wave front. For ξ= 0, this tangency coincides with the state of maximum entropy along the Rayleigh line where the downstream flow velocity becomes sonic. Therefore, the present findings refute the current consensus on the important question about the basic CJ criterion of detonations. The correct condition to obtain closure of basic conservation laws is the maximum allowable entropy along the Rayleigh line of a detonation wave, i.e. maximum entropy without weak detonation solutions. On the other hand, it is shown that practical application of the sonic–choking criterion for determining quasi–1D self–sustaining detonation waves, when the ξ is small, can be justified on the basis of its small deviation from the result predicted by the maximum allowable entropy criterion, owing to the existence of the unique solution of quasi–1D conservation equations describing the considered detonation waves.