Muwatta Malik, Book 18, Hadith 32 (USC-MSA)

Yahya related to me from Malik from Hisham ibn Urwa that his father used to be cupped while he was fasting and he would not then break his fast. Hisham added, "I only ever saw him being cupped when he was fasting." Malik said, "Cupping is only disapproved of for some one who is fasting out of fear that he will become weak and if it were not for that, it would not be disapproved of. I do not think that a man who is cupped in Ramadan and does not break his fast, owes anything, and I do not say that he has to make up for the day on which he was cupped, because cupping is only disapproved of for someone fasting if his fast is endangered. I do not think that someone who is cupped, and is then well enough to keep the fast until evening, owes anything, nor does he have to make up for that day."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ هِشَامِ بْنِ عُرْوَةَ، عَنْ أَبِيهِ، أَنَّهُ كَانَ يَحْتَجِمُ وَهُوَ صَائِمٌ ثُمَّ لاَ يُفْطِرُ ‏.‏ قَالَ وَمَا رَأَيْتُهُ احْتَجَمَ قَطُّ إِلاَّ وَهُوَ صَائِمٌ ‏.‏ قَالَ مَالِكٌ لاَ تُكْرَهُ الْحِجَامَةُ لِلصَّائِمِ إِلاَّ خَشْيَةً مِنْ أَنْ يَضْعُفَ وَلَوْلاَ ذَلِكَ لَمْ تُكْرَهْ وَلَوْ أَنَّ رَجُلاً احْتَجَمَ فِي رَمَضَانَ ثُمَّ سَلِمَ مِنْ أَنْ يُفْطِرَ لَمْ أَرَ عَلَيْهِ شَيْئًا وَلَمْ آمُرْهُ بِالْقَضَاءِ لِذَلِكَ الْيَوْمِ الَّذِي احْتَجَمَ فِيهِ لأَنَّ الْحِجَامَةَ إِنَّمَا تُكْرَهُ لِلصَّائِمِ لِمَوْضِعِ التَّغْرِيرِ بِالصِّيَامِ فَمَنِ احْتَجَمَ وَسَلِمَ مِنْ أَنْ يُفْطِرَ حَتَّى يُمْسِيَ فَلاَ أَرَى عَلَيْهِ شَيْئًا وَلَيْسَ عَلَيْهِ قَضَاءُ ذَلِكَ الْيَوْمِ ‏.‏

sunnah.com

also referenced under: Book 18, Hadith 666 (In-Book)