dakrone/clj-http — pull request #146 by dedeibel (2013-07-18 18:16:57+00:00)
Title: Use the constant ClientPNames/CONN_MANAGER_TIMEOUT for "http.conn-manager.timeout"

Hello dakrone,

please accept my pull request.

I changed the code to use the constant ClientPNames/CONN_MANAGER_TIMEOUT for "http.conn-manager.timeout". The parameter name had changed upstream and its type could not be casted correctly, which is necessary to set it into apache.http.

Additionally I changed some other parameters and added a regression test. It would still be good to know if they'd changed.

I noticed this problem when I tried to use the following code.

```clojure
(client/with-connection-pool {:default-per-route 2}
(client/get "http://www.example.com/1" {:client-params {ClientPNames/CONN_MANAGER_TIMEOUT 5000}})
(client/get "http://www.example.com/2" {:client-params {ClientPNames/CONN_MANAGER_TIMEOUT 5000}})
(client/get "http://www.example.com/3" {:client-params {ClientPNames/CONN_MANAGER_TIMEOUT 5000}}))
```

Without the fix:

```
ClassCastException java.lang.Integer cannot be cast to java.lang.Long org.apache.http.client.params.HttpClientParams.getConnectionManagerTimeout (HttpClientParams.java:122)
```

Ben.