When a drop of fluid containing long, flexible polymers breaks up, it forms threads of almost constant thickness, whose size decreases exponentially in time. Using an Oldroyd-B fluid as a model, we show that the thread profile, rescaled by the thread thickness, converges to a similarity solution. Using the correspondence between viscoelastic fluids and nonlinear elasticity, we derive similarity equations for the full three-dimensional axisymmetric flow field in the limit that the viscosity of the solvent fluid can be neglected. Deriving a conservation law along the thread, we can calculate the stress inside the thread from a measurement of the thread thickness. The explicit form of the velocity and stress fields can be deduced from a solution of the similarity equations. Results are validated by detailed comparison with numerical simulations.