forked from sinatra/sinatra
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
2 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters