aboutsummaryrefslogtreecommitdiff
path: root/src/utils/http.py
Commit message (Collapse)AuthorAgeFilesLines
* we no longer use DECODE_CONTENT_TYPESGravatar jesopo2019-12-181-1/+0
|
* allow Request objects to specify their timeoutGravatar jesopo2019-12-111-1/+3
|
* add utils.http.Session object, to preserve cookies across requestsGravatar jesopo2019-12-031-0/+14
|
* utils.http.Response.decode() should default to detected encodingGravatar jesopo2019-11-281-2/+2
|
* explicitly use "lxml" for finding page encodingGravatar jesopo2019-11-261-1/+1
|
* _find_encoding takes `bytes` and soupifies nowGravatar jesopo2019-11-261-1/+2
|
* utils.http.request_many() shouldn't decode data for ResponseGravatar jesopo2019-11-261-3/+2
|
* utils.http.Response.data should always be `bytes` - add .decode and .soupGravatar jesopo2019-11-261-25/+7
|
* remove `parser` from utils.http.Request, add Request.soup()Gravatar jesopo2019-11-261-15/+6
|
* add `cookies` and `.json()` to utils.http.Response objectsGravatar jesopo2019-11-251-7/+13
|
* change utils.http.Request to be a dataclassGravatar jesopo2019-11-251-38/+30
|
* give bitbot a unique User-AgentGravatar jesopo2019-11-201-6/+5
| | | | closes #206
* Fix type errors detected by 'mypy --ignore-missing-imports src'.Gravatar Valentin Lorentz2019-10-301-2/+2
|
* support utf8 hostnames by punycode (idna) encodingGravatar jesopo2019-10-181-4/+12
|
* parse out content_type in Response ctorGravatar jesopo2019-10-051-5/+3
|
* parse content-type out in utils.http.request, put it on Response objectGravatar jesopo2019-10-041-9/+13
|
* 'is_localhost()' -> 'host_permitted()'Gravatar jesopo2019-09-301-4/+4
|
* use ipaddress is_loopback etc to do better forbidden rangesGravatar jesopo2019-09-301-0/+9
| | | | closes #87
* assume http fallback_encoding by content-type (utf8 for json)Gravatar jesopo2019-09-251-1/+8
|
* only BeautifulSoup for finding encoding when it's a html-ish typeGravatar jesopo2019-09-201-1/+1
|
* log call was replaced with Exception but [] on args remainedGravatar jesopo2019-09-191-1/+1
|
* give Requests, use them in utils.http.request_many()Gravatar jesopo2019-09-191-12/+25
|
* utils.http.request_() has no self, let alone self.logGravatar jesopo2019-09-191-3/+4
|
* should be using pair_start/pair_end throughout `for`Gravatar jesopo2019-09-191-2/+2
|
* also show "bad" data in HTTPParsingException when a message is providedGravatar jesopo2019-09-181-1/+1
|
* show "bad" data in HTTPParsingException messageGravatar jesopo2019-09-181-2/+3
|
* don't check already-read data when checking for too-large requestsGravatar jesopo2019-09-171-1/+1
| | | | | | | this check was here because the first read will return empty if it was an invalid byte sequence for e.g. gzip because we needed to receive more data. the second read will always return data (not decoded) so regardless of what the already-read data is, the second read is the only criteria we need.
* log which URL caused an error in request_manyGravatar jesopo2019-09-171-1/+6
|
* only decode content-types in DECODE_CONTENT_TYPESGravatar jesopo2019-09-171-1/+1
|
* Response.__init__() needs `encoding` nowGravatar jesopo2019-09-171-1/+1
|
* restore 5 second (instead of default 10) deadline for http.requestGravatar jesopo2019-09-171-1/+1
|
* use utils.deadline_process() in utils.http._request() so background threads canGravatar jesopo2019-09-171-30/+37
| | | | call _request()
* add `json_body` arg to Request to json-encode body, only return from `body` ifGravatar jesopo2019-09-161-4/+8
| | | | not null
* allow Requests to specify a useragentGravatar jesopo2019-09-121-3/+4
|
* add a helper utils.http.Client static objectGravatar jesopo2019-09-111-0/+4
|
* add `proxy` to Request objectsGravatar jesopo2019-09-111-1/+2
|
* refactor utils.http.requests to support a Request objectGravatar jesopo2019-09-111-27/+77
|
* automatically decode certain http content typesGravatar jesopo2019-09-111-1/+6
|
* Don't try to .decode non-html things, default iso-lat-1 for non-html tooGravatar jesopo2019-09-091-5/+5
|
* add flag to disable encoding detectionGravatar jesopo2019-09-091-5/+4
|
* 'str.split' -> 's.split'Gravatar jesopo2019-09-091-1/+1
|
* still default to iso-latin-1 if no on-page or in-header content-type is presentGravatar jesopo2019-09-091-1/+1
|
* only look for <meta>-related tags when there are meta tagsGravatar jesopo2019-09-091-9/+11
|
* add explicit None return for _find_encoding (mypy)Gravatar jesopo2019-09-091-0/+1
|
* change utils.http.request to best-effort detect on-page encodingGravatar jesopo2019-09-091-2/+34
| | | | closes #113
* correctly qualify DeadlineExceededException namespaceGravatar jesopo2019-09-031-1/+1
|
* use utils.deadline() in utils.http.request, not raw sigalrmGravatar jesopo2019-09-021-18/+15
|
* Pass the content of a webpage to HTTPParsingExceptionGravatar jesopo2019-09-021-2/+2
|
* use \S+ for url regex (for non-ascii chars), use url_sanitize to catch <>Gravatar jesopo2019-09-021-9/+12
|
* Allow bypass of content-type check in utils.http.requestGravatar jesopo2019-08-051-3/+3
|