vert-x / mod-lang-clojure

Vert.x 2.x is deprecated - use instead
http://vertx.io
Other
74 stars 15 forks source link

http/add-header should call str on the value #114

Closed tobias closed 10 years ago

stream-iori commented 10 years ago

This is mean that (str (name value))) at line 207 in http.clj

sorry, i fould a lot thing has changed after pull project again, but i feel project has been changed more better than before :)

tobias commented 10 years ago

The issue is really that you can't pass something that is not a string, keyword, or symbol. This was discovered by trying to run the upload example - the client does:

(http/add-header req "Content-Length" (:size (fss/properties filename)))

which throws an error because a Long isn't a clojure.lang.Named. I think the fix is to change http.clj:207 to:

(-add-header req-or-resp (name key) (if (keyword? value) (name value) (str value)))
stream-iori commented 10 years ago

ok, leave it to me. i try to make a PR. :)

tobias commented 10 years ago

Great, thanks!

notifications@github.com writes:

ok, leave it to me. i try to make a PR. :)


Reply to this email directly or view it on GitHub: https://github.com/vert-x/mod-lang-clojure/issues/114#issuecomment-42179976

stream-iori commented 10 years ago

I have merge the PR. just two line changed. you can close this issue if you feel ok.

tobias commented 10 years ago

Looks great, thanks!