correct status payload size
authorAndy Green <andy@warmcat.com>
Thu, 27 Jul 2017 23:03:57 +0000 (07:03 +0800)
committerAndy Green <andy@warmcat.com>
Thu, 27 Jul 2017 23:03:57 +0000 (07:03 +0800)
lib/header.c

index c727490..6744c67 100644 (file)
@@ -238,7 +238,7 @@ lws_return_http_status(struct lws *wsi, unsigned int code,
                                         &p, end))
                return 1;
 
-       len = 37 + strlen(html_body) + sprintf(slen, "%d", code);
+       len = 35 + strlen(html_body) + sprintf(slen, "%d", code);
        n = sprintf(slen, "%d", len);
 
        if (lws_add_http_header_by_token(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH,