Please sign in to comment.
Fix redirects when using non-standard ports.
Commit 507972e introduced a change to the redirect method in order to be compliant with RFC 2616's requirement that the Location header use an "absoluteURI". However, the change relied on an undefined "port" variable. This commit fixes that omission by using the port from the request. The formatting of the redirect method has also been adjusted to wrap at approx. 78-80 characters and use "&&" and "||", like the rest of Sinatra. Specs included.
- Loading branch information...
Showing with 35 additions and 6 deletions.