I’m using mongoose in a simple C webserver app, on ubuntu.
I point some curl at it like: curl http://127.0.0.1?Domain=Test?User=David
The callback is called OK, but the hm->query.ptr doesn’t contain the whole query string.
It only contains Domain=Test .
static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
struct mg_http_message *hm = (struct mg_http_message *)ev_data, tmp = {0};
...
std::string query_text(hm->query.ptr, hm->query.len);
std::cout << "Query=" << query_text << " length=" << hm->query.len << std::endl;
What happened to the remainder of the query string? And, how do I get it?