Added CMakeLists.txt and corrected end-of-string

1. Added CMakeLists.txt for cross-platform building
2. Added endof string checking while request parsing
3. MSVC has problems with inline when the function method is in a different file. Removed it for compatibility