doctrine / couchdb-client

CouchDB Client library
MIT License
122 stars 68 forks source link

Multipart requests with content size #56

Closed jeqq closed 8 years ago

jeqq commented 8 years ago

This makes possible to process multipart streams with the content size before boundary. Eg.:

231
--7b1596fc4940bc1be725ad67f11ec1c4
Content-Type: application/json

'{"_id": "123456","_rev": "1-abcde","foo":"baz"}'

I've faced a problem when using curl in PHP - when running the replication (with https://github.com/relaxedws/drupal-replication), if the first line is the content size, not the boundary, the replication fails. That because the couchdb-client always takes the main boundary from the first line in MultipartParserAndSender::parseAndSend().

jeqq commented 8 years ago

Hello @beberlei ! I would be very grateful if you could review/merge this PR. Because of this issue our tests are failing for a long time (for a drupal module): https://www.drupal.org/pift-ci-job/388361. Thank you!