I am not an Islamic scholar. I am relying totally on The reliance of the traveller and tools of the worshipper. This appears to be an authoritative source. The following view on the merits of The reliance of the traveller appears to accord with those of amazon reviewers:
It is considered an authoritative source on Sunni Islamic law, because it is certified as such by Al-Azhar University in Cairo. There is no higher authority on Sunni Islamic doctrine than Al-Azhar; it is the closest equivalent to the Vatican that can be found in Islam.
So whatever you find in Reliance of the Traveller is definitive Islamic law. No Sunni Muslim jurist would argue against anything cited there.
Source: The ESW Defense File
Here is what the The reliance of the traveller has to say about fornication and sodomy:
o12.1 The legal penalty is obligatorily imposed upon anyone who fornicates or commits sodomy (A: provided it is legally established (def: n11.2 (O:))) when they:
(a) have reached puberty;
(b) are sane;
(c) and commit the act voluntarily; no matter whether the person is a Muslim, non-Muslim subject of the Islamic state, or someone who has left Islam.
o12.2 If the offender is someone with the capacity to remain chaste, then he or she is stoned to death (def: o12.6), someone with the capacity to remain chaste meaning anyone who has had sexual intercourse (A: at least once) with their spouse in a valid marriage, and is free, of age, and sane. A person is not considered to have the capacity to remain chaste if he or she has only had intercourse in a marriage that is invalid, or is prepubescent at the time of material intercourse, or is someone insane at the time of marital intercourse who subsequently regains their sanity prior to committing adultery.If the offender is not someone with the capacity to remain chaste, then the penalty consists of being scourged (def: o12.5) one hundred stripes and banished to a distance of at least 81 km./50 mi. for one year.
o12.4 Someone who commits fornication is not punished if he says that he did not know it was unlawful, provided he is a new Muslim or grew up in a remote (O: from Islamic scholars) wilderness, though if neither of these is the case, such a person is punished.
o12.5 An offender is not scourged in intense heat or bitter cold, or when he is ill and recovery is expected (until he recovers), or in a mosque, or when the offender is a woman who is pregnant, until shegives birth and has recovered from childbed pains. The whip used should be neither new nor old and worn-out, but something in between. The offender is not stretched out when scourged, or bound (O: as his hands are left loose to fend off blows), or undressed (O: but rather an ankle-length shirt is left upon him or her), and the scourger does not lay the stripes on hard (O: by raising his arm, such that he drawsblood). The scourger distributes the blows over various parts of the body, avoiding the vital points and the face. A man is scourged standing; a woman, sitting and covered (O: by a garment wrapped around her). If the offender is emaciated, or sick from an illness not expected to improve, then he or she is scourged with a single date palm frond (O: upon which there are a hundred strips, or fifty. If a hundred, such an offender is struck once with it, and if fifty, then twice), or with the edge of a garment.
o12.6 If the penalty is stoning, the offender is stoned even in severe heat or cold, and even if he has an illness from which he is expected to recover. A pregnant woman is not stoned until she gives birth and the child can suffice with the milk of another.