Port to uSockets v0.0.4

This commit is contained in:
Alex Hultman
2018-08-28 06:42:04 +02:00
parent be94b3e305
commit 1d94e90dd7
3 changed files with 16 additions and 2 deletions
+2
View File
@@ -35,6 +35,8 @@ std::string_view getFile(std::string_view file) {
char *key = (char *) malloc(file.length());
memcpy(key, file.data(), file.length());
std::cout << "Size: " << oss.str().size() << std::endl;
cache[std::string_view(key, file.length())] = std::string_view(cachedFile, oss.str().size());
return getFile(file);