Create a TAXII message from an HTTPResponse object.
This function parses the httplib.HTTPResponse by reading the X-TAXII-Content-Type HTTP header to determine if the message binding is supported. If the X-TAXII-Content-Type header is present and the value indicates a supported Message Binding, this function will attempt to parse the HTTP Response body.
If the X-TAXII-Content-Type header is not present, this function will attempt to build a Failure Status Message per the HTTP Binding 1.0 specification.
If the X-TAXII-Content-Type header is present and indicates an unsupported Message Binding, this function will raise a ValueError.
Parameters: |
|
---|