One who is observing a fast may taste a dish if it requires salt or spices, and he tastes and spits it out. He may taste up to the amount of a revi'it, provided that he spits it out. And even though the palate derives pleasure from this—nevertheless, there is no prohibition in the matter, for in a fast one accepts upon himself that eating and drinking shall not enter his intestines, but he did not accept upon himself the prohibition of pleasure. This is not comparable to one who vows against food, who is forbidden from tasting it. There is one who says that even if he intends for the pleasure of the palate—it is permitted when he spits it out (Magen Avraham subsection 1). And it is a wonder to say so. This applies only to an individual fast. However, on Tisha B'Av and Yom Kippur—it is forbidden, as they are complete public fasts. The other four fasts were treated regarding this matter like an individual fast. Regarding this, our teacher, the Rema, indeed writes that there are those who are stringent in every public fast, and such is our custom. Thus far his words. For it is reasonable to say that in an individual fast, in such a case, he did not accept it upon himself, but not so in a public fast.
השרוי בתענית יכול לטעום התבשיל אם צריך מלח או תבלין, וטועם ופולט. ויכול לטעום עד כדי רביעית, ובלבד שיפלוט. ואף על פי שהחיך נהנה מזה – מכל מקום אין איסור בדבר, דבתענית אכילה ושתייה קביל עליה שלא יכנסו במעיו, והנאה לא קיבל עליו. ולא דמי לנודר ממאכל, שאסור לטועמו. ויש מי שאומר דאפילו מכוין להנאת החיך – מותר כשפולט (מגן אברהם סעיף קטן א). ותימא הוא לומר כן. וזהו רק בתענית יחיד. אבל בתשעה באב ויום הכיפורים – אסור, שהם תענית ציבור גמורים. ושארי ד' צומות עשו לעניין זה כתענית יחיד. ולזה באמת כותב רבינו הרמ"א דיש מחמירין בכל תענית ציבור, והכי נוהגין. עד כאן לשונו. דבשלמא בתענית יחיד יש לומר דבכי האי גוונא לא קביל עליו, ולא בתענית ציבור.