Accept `query` in api request
authorJeroen van der Heijden <jeroen@transceptor.technology>
Thu, 16 Apr 2020 14:17:36 +0000 (16:17 +0200)
committerJeroen van der Heijden <jeroen@transceptor.technology>
Thu, 16 Apr 2020 14:17:36 +0000 (16:17 +0200)
src/siri/api.c

index bd3cf5ac4434e588946fff48f2220374c74e3c8f..32ce1849c9ab9715f46c54177836f5329e3197b4 100644 (file)
@@ -506,7 +506,7 @@ static int api__query_from_qp(api__query_t * q, siri_api_request_t * ar)
 
     while (qp_next(&up, &obj) && !qp_is_close(obj.tp))
     {
-        if (!qp_is_raw(obj.tp) || obj.len != 1)
+        if (!qp_is_raw(obj.tp) || obj.len < 1)
         {
             return api__plain_response(ar, E400_BAD_REQUEST);
         }