https://github.com/aio-libs The set of asyncio-based libraries built with high quality
popravich on travis_pypy
.travis.yml: chaching pip packa… Makefile: build/install only re… .travis.yml: cache redis-server… (compare)
RuntimeError: Session is closed
Hi, I was making a custom MultiPart form-data request and got a 502 (it's either nginx or Apache, so standard).
Commenting out this line was what made the request successful:
https://github.com/aio-libs/aiohttp/blob/5f0a59fd38f048ee65b6199a26d2355075d0d196/aiohttp/helpers.py#L372
Is this covered by some standard?
helpers.content_disposition_header
whether to encode the field value or not. In my case, it was an ASCII string. Also, curl
didn't encode it.
wraptile
posted an image: wraptile
the docs here are incorrect as dict is invalid type
wraptile
ValueError: dictionary update sequence element #0 has length 9; 2 is required
wraptile
what's the de facto way to serialize/deserialize session? For cookies it seems to be awfully complicated
wraptile
```
async def test_cookies():
async with ClientSession() as session:
session.cookie_jar.update_cookies(SimpleCookie('login=jogn; Path=/; Domain=httpbin.org'))
session.cookie_jar.update_cookies(SimpleCookie('pass=snow; Path=/; Domain=httpbin.org'))
session.cookie_jar.update_cookies(SimpleCookie('foo=bar; Path=/;'))
cookies = pickle.dumps(session.cookie_jar._cookies)
resp = await session.get('http://httpbin.org/cookies')
print(await resp.text())
async with ClientSession() as session:
session.cookie_jar._cookies = pickle.loads(cookies)
print(await resp.text())
```
wraptile
this is kinda ugly, but I guess it should work fine? 😬
wraptile
I see the bridge doesn't format the code snippet well either, ugh. Maybe now that Matrix bought gitter they can finally fix this
wraptile
yeah, the code snippet is absed of save() and load()