cch1 / http.async.client

Async Http Client - Clojure
http://cch1.github.com/http.async.client
267 stars 40 forks source link

convert-headers-to-map should throw UnsupportedOperationException, not a String #40

Closed thoughtmanifest closed 12 years ago

thoughtmanifest commented 12 years ago

https://github.com/neotyk/http.async.client/blob/master/src/clj/http/async/client/headers.clj#L48 https://github.com/neotyk/http.async.client/blob/master/src/clj/http/async/client/headers.clj#L50 https://github.com/neotyk/http.async.client/blob/master/src/clj/http/async/client/headers.clj#L51

I believe these should all throw (UnsupportedOperationException. "Headers are read only.") not just the string.

Alternatively, I believe if you don't provide a method fn, the UnsupportedOperationExceptions are thrown automatically by proxy, though I don't know that for sure being new to proxy and its use.

neotyk commented 12 years ago

Hi David,

I see you've made those changes already [1], [2]. Would you mind providing a patch and some tests for new behavior?

Thanks for feedback!

[1] https://github.com/g1nn13/http.async.client/commit/9673e01f4088ac9df4e8ed08496d209e279962fb [2] https://github.com/g1nn13/http.async.client/commit/9dd028b75fe35edf4039e8474e21c2e93359fd9e

neotyk commented 12 years ago

This is taken care of in #41.

thoughtmanifest commented 12 years ago

Awesome, thanks!

On Thursday, September 6, 2012 at 11:17 AM, Hubert Iwaniuk wrote:

This is taken care of in #41 (https://github.com/neotyk/http.async.client/issues/41).

— Reply to this email directly or view it on GitHub (https://github.com/neotyk/http.async.client/issues/40#issuecomment-8335761).