DMTF / Redfish-Event-Listener

The Redfish Event Listener is a lightweight HTTPS server that can be deployed to read and record events from Redfish services.
Other
31 stars 17 forks source link

StatusCode at RedfishEventListener_v1.py#L224 seems incorrect #2

Closed cactusjiang closed 6 years ago

cactusjiang commented 6 years ago

At RedfishEventListener_v1.py#L224, the value of StatusCode will be returned.

StatusCode = """HTTP/1.1 200 OK\r\n"""

However, in RFC7230, HTTP-message is defined as follows:

HTTP-message = start-line *( header-field CRLF ) CRLF [ message-body] start-line = request-line / status-line status-line = HTTP-version SP status-code SP reason-phrase CRLF

It seems that the tool should return status-line + CRLF and therefore StatusCode should look like the following:

StatusCode = """HTTP/1.1 200 OK\r\n\r\n"""

billdodd commented 6 years ago

Agreed. The overall HTTP-Message needs another CRLF.