You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
timeout is not a time limit on the entire response download; rather, an exception is raised if the server has not issued a response for timeout seconds (more precisely, if no bytes have been received on the underlying socket for timeout seconds).
By default, when you make a request, the body of the response is downloaded immediately. You can override this behaviour and defer downloading the response body until you access the Response.content attribute with the stream parameter:
tarball_url = 'https://github.com/requests/requests/tarball/master'
r = requests.get(tarball_url, stream=True)
At this point only the response headers have been downloaded and the connection remains open, hence allowing us to make content retrieval conditional
Example - in a channel that my Limnoria bot with SpiffyTitles is running, a user can input the following:
http://217.182.215.117/radio/8010/psy.mp3
This causes the bot to hang for myself and other user, however one user seems to only get a 18 second hang. My workaround was to:
@config supybot.plugins.SpiffyTitles.linkMessageIgnorePattern /(.mp3+)$/
(Note: this does not happen if its just a .mp3 file, only if it's a live streaming mp3)
The text was updated successfully, but these errors were encountered: