Skip to content

ParseFile use HttpClient for download #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 19, 2017

Conversation

montymxb
Copy link
Contributor

@montymxb montymxb commented Jul 19, 2017

This adjusts downloading for ParseFile to perform with the current HttpClient, rather thancurl directly.

Additionally this includes a fix to ParseStreamHttpClient where error messages & codes would not clear between individual requests. This properly cleans up prior errors on subsequent requests.

A couple typo fixes and test adjustments. Removed follow_location from the ssl options for the stream client, as the parameter is instead for http and the default is 1 anyways.

Quick mention, CURLOPT_BINARYTRANSFER was not necessary to transfer files as it has no effect from php 5.1.3 onwards. Raw output is always returned with CURLOPT_RETURNTRANSFER on it's own.

@codecov
Copy link

codecov bot commented Jul 19, 2017

Codecov Report

Merging #341 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #341      +/-   ##
==========================================
- Coverage   98.67%   98.67%   -0.01%     
==========================================
  Files          35       35              
  Lines        3166     3164       -2     
==========================================
- Hits         3124     3122       -2     
  Misses         42       42
Impacted Files Coverage Δ
src/Parse/HttpClients/ParseStream.php 100% <100%> (ø) ⬆️
src/Parse/HttpClients/ParseStreamHttpClient.php 100% <100%> (ø) ⬆️
src/Parse/ParseFile.php 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ff2404...38ce6f1. Read the comment docs.

@montymxb montymxb merged commit cbb6301 into parse-community:master Jul 19, 2017
@montymxb montymxb deleted the file-curl-fix branch July 19, 2017 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant