Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4891

Show
Ignore:
Timestamp:
09/01/06 02:18:52 (2 years ago)
Author:
kent
Message:

ActionWebService WSDL generation ignores HTTP_X_FORWARDED_HOST

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionwebservice/CHANGELOG

    r4885 r4891  
    11*SVN* 
    22 
     3* ActionWebService WSDL generation ignores HTTP_X_FORWARDED_HOST [Paul Butcher <paul@paulbutcher.com>] 
     4 
    35* Tighten rescue clauses.  #5985 [james@grayproductions.net] 
    46 
     
    1517* Fix test database name typo. [Marcel Molina Jr.] 
    1618 
    17 *1.1.2* (April 9th, 2005
     19*1.1.2* (April 9th, 2006
    1820 
    1921* Rely on Active Record 1.14.2 
  • trunk/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb

    r4761 r4891  
    168168        private 
    169169          def base_uri 
    170             host = request.env['HTTP_HOST'] || request.env['SERVER_NAME'] || 'localhost' 
     170            host = request.host_with_port 
    171171            relative_url_root = request.relative_url_root 
    172172            scheme = request.ssl? ? 'https' : 'http' 
  • trunk/actionwebservice/test/dispatcher_action_controller_soap_test.rb

    r1823 r4891  
    122122      location = definitions.services[0].ports[0].soap_address.location 
    123123      if controller.is_a?(DelegatedController) 
    124         assert_match %r{http://localhost/dispatcher_test/delegated/test_service$}, location 
     124        assert_match %r{http://test.host/dispatcher_test/delegated/test_service$}, location 
    125125      elsif controller.is_a?(DirectController) 
    126         assert_match %r{http://localhost/dispatcher_test/direct/api$}, location 
     126        assert_match %r{http://test.host/dispatcher_test/direct/api$}, location 
    127127      end 
    128128      definitions.collect_complextypes 
     
    131131    def ensure_valid_wsdl_action(controller) 
    132132      test_request = ActionController::TestRequest.new({ 'action' => 'wsdl' }) 
    133       test_request.env['REQUEST_METHOD'] = 'GET' 
    134       test_request.env['HTTP_HOST'] = 'localhost' 
    135133      test_response = ActionController::TestResponse.new 
    136134      wsdl = controller.process(test_request, test_response).body