MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / httpGetResponse

Function httpGetResponse

tools/donate-cpu-server.py:1151–1157  ·  view source on GitHub ↗
(connection: socket.socket, data: str, contentType: str)

Source from the content-addressed store, hash-verified

1149
1150
1151def httpGetResponse(connection: socket.socket, data: str, contentType: str) -> None:
1152 resp = 'HTTP/1.1 200 OK\r\n'
1153 resp += 'Connection: close\r\n'
1154 resp += 'Content-length: ' + str(len(data)) + '\r\n'
1155 resp += 'Content-type: ' + contentType + '\r\n\r\n'
1156 resp += data
1157 sendAll(connection, resp)
1158
1159
1160class HttpClientThread(Thread):

Callers 1

runMethod · 0.85

Calls 2

strFunction · 0.85
sendAllFunction · 0.85

Tested by

no test coverage detected