Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Raising error in HTTP11Response if created with illegal attributes #235

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

AvivC
Copy link
Contributor

@AvivC AvivC commented Apr 25, 2016

An HTTP response must either specify a content-length header, specify
'close' for a connection header to signal that the connection will be
closed after the response, or be a chunked response.

If none of these conditions are true, we raise a detailed ValueError,
instead of the plain assertion.

@Lukasa
Copy link
Member

Lukasa commented Apr 25, 2016

Thanks for this! The patch fails the linter: do you mind cleaning that up?

@AvivC AvivC force-pushed the validate-http11-response-info branch 2 times, most recently from 1d8f94b to 1fb6f2b Compare April 25, 2016 17:22
An HTTP response must either specify a content-length header, specify
'close' for a connection header to signal that the connection will be
closed after the response, or be a chunked response.

If none of these conditions are true, we raise a detailed ValueError,
instead of the plain assertion.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants