Skip to content

Instantly share code, notes, and snippets.

@moonmaster9000
Created June 9, 2011 20:57
Show Gist options
  • Save moonmaster9000/1017724 to your computer and use it in GitHub Desktop.
Save moonmaster9000/1017724 to your computer and use it in GitHub Desktop.
rack-test port settings
get "/", {}, "HTTP_HOST" => "example.org:9000"
last_request.port.should == 9000
get "/", {}, "SERVER_PORT" => "9000"
last_request.port.should == 9000
header "Host", "example.org:9000"
get "/"
last_request.port.should == 9000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment