  We show that certain products of Whittaker functions and Schwartz functions
on a general linear group extend to Whittaker functions on a larger general
linear group. This generalizes results of Cogdell--Piatetski-Shapiro \cite{CPS}
and Jacquet--Piatetski-Shapiro--Shalika \cite{JPSS83}. As a consequence, we
prove that the Rankin--Selberg $L$-factor of the product of a discrete series
representation and the Zelevinsky dual of a discrete series representation is
given by a single Rankin--Selberg integral.
