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

Downloading a file with Range in a loop creates too many tcp connection #2303

Closed
Anan5a opened this issue May 14, 2019 · 1 comment
Closed
Labels
lifecycle/stale No activity for a long time

Comments

@Anan5a
Copy link

Anan5a commented May 14, 2019

I'm trying to download partial content of a file inside a loop and process that. But it creates so many tcp connection that the Remote server denies the request.
My code is like this

...
while(!$ended){
$resp = $client ->get($url,[
'headers'=>[
'Range'=>"bytes=$start-$end",
]
]);
process($resp->getBody()->getContent());
}

How to solve it so it doesn't bomb the remote server with requests?

@stale
Copy link

stale bot commented Sep 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you for your contributions.

@stale stale bot added the lifecycle/stale No activity for a long time label Sep 25, 2020
@stale stale bot closed this as completed Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale No activity for a long time
Projects
None yet
Development

No branches or pull requests

1 participant