Skip to content
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

Writes empty files when using sink #82

Open
shadowhand opened this issue Jun 30, 2017 · 3 comments
Open

Writes empty files when using sink #82

shadowhand opened this issue Jun 30, 2017 · 3 comments

Comments

@shadowhand
Copy link

shadowhand commented Jun 30, 2017

Whenever I use this middleware when combined with the sink option empty files are written:

$client->get($uri, ['sink' => "$dir/$uri"]);

The file $dir/$uri is created but has no content.

@Kevinrob
Copy link
Owner

Kevinrob commented Jul 1, 2017

Are you sure that this is this middleware that cause the issue?
The sink option is handled before this middleware.

Can you share/post your code?

@shadowhand
Copy link
Author

shadowhand commented Jul 5, 2017

Yes, I've confirmed that sink works correctly when this middleware is disabled.

Guzzle config is here and here is our calling code, which is currently not using sink due to this issue.

@samwilson
Copy link

We're also seeing this issue in this project. The workaround of not using sink (and instead writing the response body out to a file after the Guzzle request) seems to work fine.

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

No branches or pull requests

3 participants