We investigate the characteristics of a relativistic magnetized fluid flowing around a corner. If the outflow is faster than the fast-magnetosonic speed (or sound speed for a non-magnetized fluid) the non-smooth boundary induces a rarefaction wave propagating in the body of the flow. The subsequent expansion is accompanied with a very efficient increase of the flow bulk speed and Lorentz factor. We apply this “rarefaction acceleration mechanism” to the Collapsar model of gamma-ray bursts, in which a relativistic jet initially propagates in the interior of the progenitor star, before crossing the stellar surface with a simultaneous drop in the external pressure support. We integrated the steady-state equations using a special set of partial solutions, called r – self similar. The use of these solutions degrades the system of the complex, non-linear, 2nd order partial differential equations into a system of two 1st order ordinary differential equations whose integration is straightforward. For the conditions expected in a GRB, a fully analytical solution can also be obtained. The aim of this work is to give insight to the results of recent time-depended numerical simulations and show that rarefaction is a plausible mechanism for these phenomena.