<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -137,7 +137,8 @@ module JRuby
 
       def call(env)
         env['rails.session_options'] = @servlet_helper.session_options_for_request(env)
-        env[&quot;RAILS_RELATIVE_URL_ROOT&quot;] = env['java.servlet_request'].getContextPath
+        env['RAILS_RELATIVE_URL_ROOT'] = env['java.servlet_request'].getContextPath
+        env['HTTPS'] = 'on' if env['rack.url_scheme'] == 'https'
         @app.call(env)
       end
     end</diff>
      <filename>src/main/ruby/jruby/rack/rails.rb</filename>
    </modified>
    <modified>
      <diff>@@ -155,17 +155,28 @@ describe JRuby::Rack, &quot;Rails controller extensions&quot; do
 end
 
 describe JRuby::Rack::RailsSetup do
+  before :each do
+    @app = mock &quot;app&quot;
+    @servlet_request = mock &quot;servlet request&quot;
+    @servlet_request.stub!(:getContextPath).and_return &quot;/blah&quot;
+    @helper = mock &quot;servlet helper&quot;
+    @options = mock &quot;options&quot;
+    @helper.stub!(:session_options_for_request).and_return @options
+    @rs = JRuby::Rack::RailsSetup.new @app, @helper
+    @env = {}
+    @env['java.servlet_request'] = @servlet_request
+  end
+
   it &quot;should set up the env hash for Rails&quot; do
-    app = mock &quot;app&quot;
-    helper = mock &quot;servlet helper&quot;
-    rs = JRuby::Rack::RailsSetup.new app, helper
-    options = mock &quot;options&quot;
-    env = {}
-    app.should_receive(:call).with(env)
-    helper.should_receive(:session_options_for_request).and_return options
-    env['java.servlet_request'] = mock &quot;servlet request&quot;
-    env['java.servlet_request'].should_receive(:getContextPath).and_return &quot;/blah&quot;
-    rs.call(env)
-    env['rails.session_options'].should == options
+    @app.should_receive(:call).with(@env)
+    @rs.call(@env)
+    @env['rails.session_options'].should == @options
+  end
+
+  it &quot;should set env['HTTPS'] == 'on' if env['rack.url_scheme] == 'https'&quot; do
+    @app.should_receive(:call).with(@env)
+    @env['rack.url_scheme'] = 'https'
+    @rs.call(@env)
+    @env['HTTPS'].should == 'on'
   end
 end</diff>
      <filename>src/spec/ruby/jruby/rack/rails_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>15b34e36e967ed96d4caa2b0eb9c1dc8499117a1</id>
    </parent>
  </parents>
  <author>
    <name>nsieger</name>
    <email>nsieger@97a6c6ee-731e-0410-87e5-e5612b5efbfe</email>
  </author>
  <url>http://github.com/nicksieger/jruby-rack/commit/42877c70c1526d59539c676af32a27424d8d38bb</url>
  <id>42877c70c1526d59539c676af32a27424d8d38bb</id>
  <committed-date>2008-06-10T21:10:45-07:00</committed-date>
  <authored-date>2008-06-10T21:10:45-07:00</authored-date>
  <message>set ENV['HTTPS'] = 'on' for Rails depending on servlet request scheme (Lenny Marks)


git-svn-id: https://svn.codehaus.org/jruby-contrib/trunk/rack@179 97a6c6ee-731e-0410-87e5-e5612b5efbfe</message>
  <tree>3579d89f43818fa53008a57cea1a694d8ef4ec40</tree>
  <committer>
    <name>nsieger</name>
    <email>nsieger@97a6c6ee-731e-0410-87e5-e5612b5efbfe</email>
  </committer>
</commit>
