diff options
Diffstat (limited to 'midiplay.cpp')
-rw-r--r-- | midiplay.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/midiplay.cpp b/midiplay.cpp index 75f33da..d5c0ef0 100644 --- a/midiplay.cpp +++ b/midiplay.cpp @@ -1,3 +1,5 @@ +#include "MIDIPlayer.h" + #include <string> #include <fcgiapp.h> @@ -17,7 +19,7 @@ std::string getPostData(FCGX_Request& request) unsigned int status = FCGX_GetStr(result.data(), result.size(), request.in); if (status != result.size()) { - return fmt::format("Read error: {}/{}", status, result); + return fmt::format("Read error: {}/{}", status, result.size()); } return result; @@ -46,8 +48,9 @@ int main(int argc, char* argv[]) { FCGX_PutS("Content-Type: text/xml\r\n\r\n", request.out); std::string data = getPostData(request); - if (data == "<data><value1>3</value1></data>") + if (data == "<data><command>3</command></data>") { FCGX_PutS("<data><value1>4</value1></data>", request.out); + } } else { FCGX_PutS("Content-Type: text/text\r\n\r\n", request.out); FCGX_PutS("Bad request method: POST expected", request.out); |