Skip to content

Commit

Permalink
fix websocket listen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Lev Walkin committed Sep 30, 2016
1 parent 3f954a3 commit da09749
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tcpkali_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ message_collection_finalize(struct message_collection *mc, int as_websocket,
assert(mc->state == MC_EMBRYONIC);

if(as_websocket) {
if(!hostport) hostport = "";
if(!path) path = "";
if(!headers) headers = "";

ssize_t estimated_size = sizeof(ws_http_headers_fmt) + strlen(hostport)
+ strlen(path) + strlen(headers);
char http_headers[estimated_size];
Expand Down

0 comments on commit da09749

Please sign in to comment.