Port Number is removed from the URL after a post

0 views
Skip to first unread message

ChrisR

unread,
Feb 6, 2008, 5:45:37 AM2/6/08
to SwitchPipe
When i browse my rails site only clicking on hyperlinks everything
works ok, but when i click on a button (post) , the next URL that i
am forwarded to has had its port number removed . e.g :

I have browsed to this page in my "tph" application :

http://neptune:10000/tph/ali_aro_setups/10060

then when i click on my submit button I am forwarded to this URL :

http://neptune/tph/ali_aro_setups/10060

which is almost right, but it is missing the port number! so it doesnt
work.

This is with the latest trunk, any ideas what the problem is?

Keep up the good word!

Thanks
Chris

Peter Cooper

unread,
Feb 6, 2008, 10:56:33 AM2/6/08
to SwitchPipe
I'm not quite sure, as I can't recreate this in the demo Rails apps
I'm running. You don't have it using an absolute URL (with hostname)
rather than just the usual relative URLs / path only URLs Rails puts
out, do you? If so, can you tell me how it's being constructed? In
theory the full hostname with the port number /should/ be getting
passed through to the backends so that this info can be used in
absolute URLs.

That said, I have just committed a new revision to trunk that stops
the port number being removed when working out the hostname to use. I
don't think this will have an effect, but you never know :)

Pete

ChrisR

unread,
Feb 6, 2008, 3:53:05 PM2/6/08
to SwitchPipe

In my rails config i have

ActionController::AbstractRequest.relative_url_root = "/tph"

also in my config.yml i have

hostname: neptune

It worked a couple of days ago when I tried it.

I'll try the latest version in the trunk and see how it goes.

Thanks
Chris

ChrisR

unread,
Feb 6, 2008, 4:54:50 PM2/6/08
to SwitchPipe
It fine works now.

Thanks
Chris
Reply all
Reply to author
Forward
0 new messages