Al-Ilmam bi-Ahadith al-Ahkam 534
وَعَن أنس بن مَالك رَضِيَ اللَّهُ عَنْه، قَالَ: أول مَا كرهت الْحجامَة للصَّائِم أَن جَعْفَر بن أبي طَالب احْتجم، وَهُوَ صَائِم، فَمر بِهِ النَّبِي ﷺ فَقَالَ: " أفطر هَذَانِ "، ثمَّ رخص (النَّبِي ﷺ ) (بعد) (ذَلِك) فِي الْحجامَة (للصَّائِم) ". وَكَانَ أنس يحتجم وَهُوَ صَائِم. أخرجه الدَّارَقُطْنِيّ، وَقَالَ: كلهم ثِقَات، وَلَا أعلم لَهُ عِلّة.
And from Anas ibn Malik, may Allah be pleased with him, who said: The first time cupping was disliked for the fasting person was when Jaʿfar ibn Abi Talib had himself cupped while fasting, and the Prophet ﷺ passed by him and said: "These two have broken their fast." Then (the Prophet ﷺ) gave permission (after) (that) for cupping (for the fasting person). And Anas used to have himself cupped while fasting. Ad-Daraqutni recorded it and said: All of them are reliable, and I know of no defect in it.