sproutit / sproutcore-abbot

SproutCore 1.0 Build Tools
http://www.sproutcore.com
78 stars 17 forks source link

Proxy server strips port from location in header responses #2

Open alexgb opened 14 years ago

alexgb commented 14 years ago

Seems that line 90 in proxy.rb should reinsert the environments port in the location header.

value.gsub!(/^http:\/\/#{http_host}(:[0-9]+)?\//, "http://#{http_host}:4020/") if key.downcase == 'location'

Otherwise 204 redirects won't work with virtual hosts

sproutit commented 14 years ago

anyway we can get a patch for this w/ some unit test love?

wagenet commented 14 years ago

This may still be an issue. The current line is: value.gsub!(/^http:\/\/#{http_host}(:[0-9]+)?\//, "http://#{http_host}/") if key.downcase == 'location' I'm not sure what the exact point of it is so I'm hesitant to mess with it.