-
Notifications
You must be signed in to change notification settings - Fork 498
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
Add ability to send multiple requests at once #23
Commits on Jul 3, 2012
-
This is a first pass and will probably be altered before merging. Still needs more hooks and more tests. Only implemented for cURL so far. Trivia: I wrote this completely without internet access (and hence, no documentation either). Imagine my surprise when it worked first time.
Configuration menu - View commit details
-
Copy full SHA for 99836dd - Browse repository at this point
Copy the full SHA 99836ddView commit details -
Only fire multiple.request.complete once parsed
If we end up with a situation where our hook doesn't fire for some reason, we shouldn't pass this on to the hooks. Instead, wait until the end when we ensure they're instances.
Configuration menu - View commit details
-
Copy full SHA for fb5e1c2 - Browse repository at this point
Copy the full SHA fb5e1c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66235e5 - Browse repository at this point
Copy the full SHA 66235e5View commit details -
Add multiple request support to Transport_fsockopen
fsockopen doesn't support multiple simultaneous requests, so we just fake it here instead. What it actually does is to send every request sequentially, so the result back from Requests::request_multiple() will be the same.
Configuration menu - View commit details
-
Copy full SHA for bd4816f - Browse repository at this point
Copy the full SHA bd4816fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b0199e - Browse repository at this point
Copy the full SHA 4b0199eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe5e7ed - Browse repository at this point
Copy the full SHA fe5e7edView commit details -
Change cURL hooks around a bit
curl.before_request and curl.after_request are now fired on every cURL request. curl.before_send and curl.after_send are for single requests, while curl.before_multi_add, curl.before_multi_exec and curl.after_multi_exec are for multiple requests.
Configuration menu - View commit details
-
Copy full SHA for ddcff9a - Browse repository at this point
Copy the full SHA ddcff9aView commit details -
Avoid double-checking for cURL errors
curl_multi_info_read()'s 'result' value is the same as curl_errno(), which we handle per-request in a nicer way.
Configuration menu - View commit details
-
Copy full SHA for a2037d6 - Browse repository at this point
Copy the full SHA a2037d6View commit details -
Stick to a single shared key for all cURL data
Rather than relying on typecasting the cURL resource to an integer to form a key, use the proper key instead.
Configuration menu - View commit details
-
Copy full SHA for 80efd61 - Browse repository at this point
Copy the full SHA 80efd61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 277ee66 - Browse repository at this point
Copy the full SHA 277ee66View commit details -
Configuration menu - View commit details
-
Copy full SHA for f39a480 - Browse repository at this point
Copy the full SHA f39a480View commit details -
Pass the ID into the multiple request callback
To make it easier to track a request after it's complete, we pass in the original identifier along with the response.
Configuration menu - View commit details
-
Copy full SHA for f925013 - Browse repository at this point
Copy the full SHA f925013View commit details -
Ensure multi defaults match normal defaults
This should all be abstracted away.
Configuration menu - View commit details
-
Copy full SHA for d4825a0 - Browse repository at this point
Copy the full SHA d4825a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for aca20ac - Browse repository at this point
Copy the full SHA aca20acView commit details -
Allow easy hooking into multiple.request.complete
This is a bit of duplication (given that you can just make your own Requests_Hooks and add it), but it saves a few extra lines on the user's end.
Configuration menu - View commit details
-
Copy full SHA for d7e68b3 - Browse repository at this point
Copy the full SHA d7e68b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8b795d - Browse repository at this point
Copy the full SHA f8b795dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 533a4f1 - Browse repository at this point
Copy the full SHA 533a4f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbdd442 - Browse repository at this point
Copy the full SHA cbdd442View commit details -
Configuration menu - View commit details
-
Copy full SHA for bacf847 - Browse repository at this point
Copy the full SHA bacf847View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2bea203 - Browse repository at this point
Copy the full SHA 2bea203View commit details -
Ensure streaming files works properly
This should fix the currently broken unit tests. Yay!
Configuration menu - View commit details
-
Copy full SHA for f81b9f1 - Browse repository at this point
Copy the full SHA f81b9f1View commit details -
Don't return cURL result by reference
If we're in non-blocking mode, there's no reference to return. We're not really saving anything with this anyway.
Configuration menu - View commit details
-
Copy full SHA for df5c648 - Browse repository at this point
Copy the full SHA df5c648View commit details -
Move defaulting code to a common method
This is currently lacking documentation. Coming soon.
Configuration menu - View commit details
-
Copy full SHA for 9a4e351 - Browse repository at this point
Copy the full SHA 9a4e351View commit details -
Configuration menu - View commit details
-
Copy full SHA for b04ac1b - Browse repository at this point
Copy the full SHA b04ac1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab535ff - Browse repository at this point
Copy the full SHA ab535ffView commit details
Commits on Jul 4, 2012
-
Configuration menu - View commit details
-
Copy full SHA for 6d14220 - Browse repository at this point
Copy the full SHA 6d14220View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4b6b67 - Browse repository at this point
Copy the full SHA b4b6b67View commit details -
Configuration menu - View commit details
-
Copy full SHA for a112b3f - Browse repository at this point
Copy the full SHA a112b3fView commit details
Commits on Jul 5, 2012
-
Ensure fsockopen uses the correct hooking system
multiple.request.complete is called on the request's hooking system, not the global one.
Configuration menu - View commit details
-
Copy full SHA for 3886af0 - Browse repository at this point
Copy the full SHA 3886af0View commit details
Commits on Jul 6, 2012
-
Configuration menu - View commit details
-
Copy full SHA for bbcded4 - Browse repository at this point
Copy the full SHA bbcded4View commit details
Commits on Oct 25, 2012
-
Configuration menu - View commit details
-
Copy full SHA for 570d675 - Browse repository at this point
Copy the full SHA 570d675View commit details -
Test failures in multiple requests too
Also, move the callback to a proper method. Fixes 5.2 compatibility as well as avoiding duplication.
Configuration menu - View commit details
-
Copy full SHA for 2b4ce1d - Browse repository at this point
Copy the full SHA 2b4ce1dView commit details -
Previously, this checked a nonexistent variable, and I'm not sure why. If it ever needs to be fixed, blame me.
Configuration menu - View commit details
-
Copy full SHA for f8d3aa6 - Browse repository at this point
Copy the full SHA f8d3aa6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 937c748 - Browse repository at this point
Copy the full SHA 937c748View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23c2087 - Browse repository at this point
Copy the full SHA 23c2087View commit details