Open ap1459777123 opened 8 years ago
I have the same problem and the syntax to extract multiple cookies doesn't make sense:
- extract_binds:
- 'c1': { header: 'set-cookie'}
- 'c2': { header: 'set-cookie'}
- 'c3': { header: 'set-cookie'}
- 'jwt': { header: 'set-cookie'}
The variables will never know which cookie variable corresponds to which cookie value
Hi, I've written a test to check my app's login function.
When adding
remember: true
in first req's body, there would be two Set-cookie in the resp,session
andremember_token
. And the$cookie
variable would be set to list['remember_token=somestring; Path=/', 'session=anotherstring; HttpOnly; Path=/']
.After appending
$cookie
back to req's header in test 2 (check login), the verbose req's header (using --verbose --log=DEBUG --interactive=True to run pyresttest) would be:Cookie:['remember_token=somestring; Path=/', 'session=anotherstring; HttpOnly; Path=/']
Yet server only got:
'cookies': {'HttpOnly; Path': u"/']", "['remember_token": u'somestring'}
in req header's cookie part.If I remove
remember: true
in first req's body, there would be only one Set-cookie in the resp. And everything goes normal. Server would got:'cookies': {'HttpOnly; Path': u'/', 'session': u'anotherstring'}
still seems weird.Therefore I think if there are cookie parse errors when using extract_binds.