It is true that in the category of topological spaces $ \mathrm{Map}(\underset{i\in I}{\mathrm{colim}}\, X_i, Y)\cong \underset{i\in I}{\mathrm{lim}}\,\mathrm{Map}(X_i,Y)$ ? Here mapping spaces are endowed with the compact-open topology. One has a bijective map from the left-hand side to the right-hand side, but is this map a homeomorphism? For example, if $X_1\subset X_2$, is the inclusion $\mathrm{Map}(X_2/X_1,Y)\subset \mathrm{Map}(X_2,Y)$ a homeomorphism on its image? If not, what if this inclusion is a cofibration?

(Compare with my previous question Mapping space from a quotient space.)