A person should not stand in a private domain and urinate into a public domain, or in a public domain and urinate into a private domain, and similarly he should not spit. And if he urinated or spat—he is liable for a chatat, for he has uprooted from a private domain and deposited in a public domain or vice versa. And even though the place of the urine is not a place of four by four, and similarly his mouth is not a place of four by four, nevertheless his intention makes it a place of four by four, as I wrote in siman 347, section 4, for since his mouth and the place of the urine stand where the body stands, we say his intention makes it a place, as I wrote. And similarly, he should not stand in a karmelit and urinate into a private domain or into a public domain, or from them into a karmelit, for he is carrying from a karmelit to a private domain and a public domain or vice versa. And even if he extended his mouth and his organ outside—it is forbidden to urinate or to spit, for they were uprooted from his body which stands in another domain. And it is not similar to drinking, for there it was placed in his mouth beforehand and afterwards enters the intestines. But urine does not linger in the opening of the organ at all, but rather goes from his body to the outside, and similarly the spit. However, in this he is not liable for a chatat, for it is a question that was not resolved in Eruvin (99a).
And similarly, one who walks in a public domain and spit collects in his mouth, some say that he should not walk four amot until he spits, for since he needs to cast out the spit, it is considered like a burden, and this is the opinion of the Tur. But the Rambam in the commentary on the Mishnah there, ruled that the halacha is not so, see there, and similarly wrote the Bartenura there. And it appears from the Gemara there, that regarding phlegm and mucus it is certainly forbidden when they have become detached and are placed in his mouth, see there. (However, it is not absolute proof, for there everything is according to Rabbi Yehuda, and they ruled not like Rabbi Yehuda, and although phlegm and mucus were not mentioned in the Mishnah, nevertheless who is to say that even in this the sages did not disagree with him. And nevertheless one should be stringent, since the Tur rules like Rabbi Yehuda even regarding spit, and in the Shulchan Aruch this opinion was brought, certainly one should be careful in this. However, for us where there is no public domain, perhaps everyone agrees, and delve into this).
לא יעמוד אדם ברשות היחיד וישתין ברשות הרבים, ברשות הרבים וישתין ברשות היחיד, וכן לא ירוק. ואם השתין או רק - חייב חטאת, שהרי עקר מרשות היחיד והניח ברשות הרבים או להיפך. ואף על גב דמקום השתן אינו מקום ד', וכן פיו אינו מקום ד', אך מחשבתו משוי ליה מקום ד', כמ"ש בסימן שמ"ז סעיף ד', דכיון דפיו ומקום השתן עומדים במקום שהגוף עומד, אמרינן מחשבתו משוי ליה מקום, כמ"ש. וכן לא יעמוד בכרמלית וישתין לרשות היחיד או לרשות הרבים, או מהם לכרמלית, שהרי מטלטל מכרמלית לרשות היחיד ולרשות הרבים או להיפך. ואפילו אם הוציא פיו ואמתו לחוץ - אסור להשתין או לרוק, שהרי נעקרו מגופו העומד ברשות אחר. ולא דמי לשתייה, דבשם מונח בפיו מקודם ואחר כך נכנס למעיים. אבל השתן אינו מתעכב בפי האמה כלל, אלא הולך מגופו לחוץ, וכן הרוק. אך בזה אינו חייב חטאת דהיא בעיא דלא איפשיטא בעירובין. (צ"ט.)וכן ההולך ברשות הרבים ונאסף רוק בפיו, יש אומרים שלא יהלך ד' אמות עד שירוק, דכיון דצריך להשליך הרוק נחשב כמשוי, וזהו דעת הטור. אבל הרמב"ם בפירוש המשנה שם, פסק דאין הלכה כן ע"ש, וכן כתב הרע"ב שם. ונראה מהש"ס שם, דבכיחו וניעו וודאי אסור כשנתלשו ומונחים בפיו ע"ש. (אך אינה ראיה גמורה דהתם הכל אליבא דר"י, והם פסקו דלא כר"י, והגם דכיחו וניעו לא הוזכרו במשנה, מכל מקום מי יימר דגם בזה לא נחלקו חכמים עליו. ומכל מקום יש להחמיר, כיון דהטור פוסק כר"י גם ברוק, ובש"ע הובא דיעה זו, ודאי דיש ליזהר בזה. אך אצלינו דאין רשות הרבים אולי הכל מודים ודו"ק).