dakrone / clj-http

An idiomatic clojure http client wrapping the apache client. Officially supported version.
http://clojars.org/clj-http
MIT License
1.78k stars 408 forks source link

Adds workaround for Async Multipart uploads greater than 25 kb #574

Closed rymndhng closed 3 years ago

rymndhng commented 3 years ago

Fixes #560

dakrone commented 3 years ago

It does appear there is a suggested workaround in the JIRA issue by wrapping with a BufferedHttpEntity, perhaps that would be a better solution for this?

rymndhng commented 3 years ago

@dakrone I gave it a try, but unfortunately it fails for the same reason in my test case. The BufferedHttpEntity may buffer the contents, depending on some of the flags.

See https://github.com/apache/httpcomponents-core/blob/cd88841e0/httpcore/src/main/java/org/apache/http/entity/BufferedHttpEntity.java#L58-L68

Removing the checks in the original solution is more reliable to retain the existing behaviour our users expect.

romashatomar commented 3 years ago

Hi, I am facing "Content too long" exception when trying to update content as a byte array (using multi part form data) using Http Async Client . I see that changes have been made to remove those lines of code . Have they been released ? I am using httpmime : 4.5.12 and I get the same error.

rymndhng commented 3 years ago

@romashatomar the changes were released in clj-http 3.11.0. If you are seeing issues with clj-http, file a new issue and provide reproduction steps and I can help investigate further.