remove [] from the separators for query string fields; fixes #956
Costa Tsaousis (ktsaou) committed
Sep 14, 2016 at 23:40 UTC
8b84bdaf6af702c7f87a9b7bf0d5d3709d3f2171
1 file changed
+6
-6
src/web_client.c
+6
-6
@@ -665,7 +665,7 @@ int web_client_api_request_v1_alarms(struct web_client *w, char *url)
665
int all = 0;
666
667
while(url) {
668
- char *value = mystrsep(&url, "?&[]");
668
+ char *value = mystrsep(&url, "?&");
669
if (!value || !*value) continue;
670
671
if(!strcmp(value, "all")) all = 1;
@@ -683,7 +683,7 @@ int web_client_api_request_v1_alarm_log(struct web_client *w, char *url)
683
uint32_t after = 0;
684
685
while(url) {
686
- char *value = mystrsep(&url, "?&[]");
686
+ char *value = mystrsep(&url, "?&");
687
if (!value || !*value) continue;
688
689
char *name = mystrsep(&value, "=");
@@ -717,7 +717,7 @@ int web_client_api_request_v1_chart(struct web_client *w, char *url)
717
buffer_flush(w->response.data);
718
719
while(url) {
720
- char *value = mystrsep(&url, "?&[]");
720
+ char *value = mystrsep(&url, "?&");
721
if(!value || !*value) continue;
722
723
char *name = mystrsep(&value, "=");
@@ -781,7 +781,7 @@ int web_client_api_request_v1_badge(struct web_client *w, char *url) {
781
uint32_t options = 0x00000000;
782
783
while(url) {
784
- char *value = mystrsep(&url, "/?&[]");
784
+ char *value = mystrsep(&url, "/?&");
785
if(!value || !*value) continue;
786
787
char *name = mystrsep(&value, "=");
@@ -1011,7 +1011,7 @@ int web_client_api_request_v1_data(struct web_client *w, char *url)
1011
uint32_t options = 0x00000000;
1012
1013
while(url) {
1014
- char *value = mystrsep(&url, "?&[]");
1014
+ char *value = mystrsep(&url, "?&");
1015
if(!value || !*value) continue;
1016
1017
char *name = mystrsep(&value, "=");
@@ -1206,7 +1206,7 @@ int web_client_api_request_v1_registry(struct web_client *w, char *url)
1206
*/
1207
1208
while(url) {
1209
- char *value = mystrsep(&url, "?&[]");
1209
+ char *value = mystrsep(&url, "?&");
1210
if (!value || !*value) continue;
1211
1212
char *name = mystrsep(&value, "=");