<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -19,6 +19,12 @@ module ActiveMerchant #:nodoc:
       
       base.class_inheritable_accessor :retry_safe
       base.retry_safe = false
+
+      base.superclass_delegating_accessor :open_timeout
+      base.open_timeout = OPEN_TIMEOUT
+
+      base.superclass_delegating_accessor :read_timeout
+      base.read_timeout = READ_TIMEOUT
     end
     
     def ssl_post(url, data, headers = {})
@@ -28,8 +34,8 @@ module ActiveMerchant #:nodoc:
       uri   = URI.parse(url)
 
       http = Net::HTTP.new(uri.host, uri.port) 
-      http.open_timeout = OPEN_TIMEOUT
-      http.read_timeout = READ_TIMEOUT
+      http.open_timeout = self.class.open_timeout
+      http.read_timeout = self.class.read_timeout
       http.use_ssl      = true
       
       if ssl_strict</diff>
      <filename>lib/active_merchant/lib/posts_data.rb</filename>
    </modified>
    <modified>
      <diff>@@ -85,4 +85,16 @@ class PostsDataTests &lt; Test::Unit::TestCase
     SimpleTestGateway.ssl_strict = !SimpleTestGateway.ssl_strict
     assert_equal SimpleTestGateway.ssl_strict, SubclassGateway.ssl_strict
   end
+
+  def test_setting_timeouts
+    @gateway.class.open_timeout=50
+    @gateway.class.read_timeout=37
+    Net::HTTP.any_instance.expects(:post).once.returns(MockResponse.new)
+    Net::HTTP.any_instance.expects(:open_timeout=).with(50)
+    Net::HTTP.any_instance.expects(:read_timeout=).with(37)
+
+    assert_nothing_raised do
+      @gateway.ssl_post(URL, '')
+    end
+  end
 end
\ No newline at end of file</diff>
      <filename>test/unit/posts_data_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7cff75e927b6c90f045b3bd1277f7738e09f1c3e</id>
    </parent>
  </parents>
  <author>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </author>
  <url>http://github.com/BDQ/active_merchant/commit/59fc3b11d9748195d68df04cfb9ac29b06eebc91</url>
  <id>59fc3b11d9748195d68df04cfb9ac29b06eebc91</id>
  <committed-date>2008-08-28T04:09:57-07:00</committed-date>
  <authored-date>2008-08-28T04:09:57-07:00</authored-date>
  <message>Make timeout settings configurable for subclasses instead of constants.

The original constants are used to set the default values.  This ensures that if you've overridden these constants they will continue to work correctly.</message>
  <tree>9960348e96a014dd76e681147ee0eb74ceaabe37</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
