cch1 / http.async.client

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

Fixes issue when parsing some cookies #30

Closed canassa closed 12 years ago

canassa commented 12 years ago

The current create-cookies function assumes that the 'set-cookie' header is always a vector.

I find out that this is not always true. If the response from the server contains a single 'set-cookie', the 'set-cookie' entry in the header map will be a string instead of a vector. This generates a java exception when the create-cookies function is called.

I wrote a new test to catch this scenario and changed the 'create-cookie' function to handle it.

Disclamer: I am Clojure newbie! I hope that everything is okay!

Thanks for the work you put on this library.

Cesar Canassa

neotyk commented 12 years ago

Thank you for the patch!

I've already merged it to development branch and pushed snapshot to clojars. Will create release for it later today.