Loading src/tool_getparam.c +27 −27 Original line number Diff line number Diff line Loading @@ -1814,9 +1814,21 @@ ParameterError parse_args(struct GlobalConfig *config, int argc, for(i = 1, stillflags = TRUE; i < argc && !result; i++) { orig_opt = argv[i]; if(curlx_strequal(":", argv[i]) && (operation->url_list && operation->url_list->url)) { if(stillflags && ('-' == argv[i][0])) { char *nextarg; bool passarg; char *flag = argv[i]; if(curlx_strequal("--", argv[i])) /* This indicates the end of the flags and thus enables the following (URL) argument to start with -. */ stillflags = FALSE; else { nextarg = (i < (argc - 1)) ? argv[i + 1] : NULL; result = getparameter(flag, nextarg, &passarg, config, operation); if(result == PARAM_NEXT_OPERATION) { if(operation->url_list && operation->url_list->url) { /* Allocate the next config */ operation->next = malloc(sizeof(struct OperationConfig)); if(operation->next) { Loading @@ -1832,27 +1844,15 @@ ParameterError parse_args(struct GlobalConfig *config, int argc, /* Move onto the new config */ operation->next->prev = operation; operation = operation->next; /* Reset the flag indicator */ stillflags = TRUE; } else result = PARAM_NO_MEM; } else if(stillflags && ('-' == argv[i][0])) { char *nextarg; bool passarg; char *flag = argv[i]; if(curlx_strequal("--", argv[i])) /* This indicates the end of the flags and thus enables the following (URL) argument to start with -. */ stillflags = FALSE; else { nextarg = (i < (argc - 1)) ? argv[i + 1] : NULL; result = getparameter(flag, nextarg, &passarg, config, operation); if(!result && passarg) /* Reset result to continue */ result = PARAM_OK; } else if(!result && passarg) i++; /* we're supposed to skip this */ } } Loading tests/data/test815 +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ imap IMAP STORE - delete message (CUSTOMREQUEST) </name> <command> imap://%HOSTIP:%IMAPPORT/815 -X 'STORE 123 +Flags \Deleted' -u user:secret : imap://%HOSTIP:%IMAPPORT/815 -X CLOSE imap://%HOSTIP:%IMAPPORT/815 -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/815 -X CLOSE </command> </client> Loading tests/data/test816 +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ imap IMAP STORE - delete message with confirmation (CUSTOMREQUEST) </name> <command> imap://%HOSTIP:%IMAPPORT/816 -X 'STORE 123 +Flags \Deleted' -u user:secret : imap://%HOSTIP:%IMAPPORT/816 -X EXPUNGE imap://%HOSTIP:%IMAPPORT/816 -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/816 -X EXPUNGE </command> </client> Loading Loading
src/tool_getparam.c +27 −27 Original line number Diff line number Diff line Loading @@ -1814,9 +1814,21 @@ ParameterError parse_args(struct GlobalConfig *config, int argc, for(i = 1, stillflags = TRUE; i < argc && !result; i++) { orig_opt = argv[i]; if(curlx_strequal(":", argv[i]) && (operation->url_list && operation->url_list->url)) { if(stillflags && ('-' == argv[i][0])) { char *nextarg; bool passarg; char *flag = argv[i]; if(curlx_strequal("--", argv[i])) /* This indicates the end of the flags and thus enables the following (URL) argument to start with -. */ stillflags = FALSE; else { nextarg = (i < (argc - 1)) ? argv[i + 1] : NULL; result = getparameter(flag, nextarg, &passarg, config, operation); if(result == PARAM_NEXT_OPERATION) { if(operation->url_list && operation->url_list->url) { /* Allocate the next config */ operation->next = malloc(sizeof(struct OperationConfig)); if(operation->next) { Loading @@ -1832,27 +1844,15 @@ ParameterError parse_args(struct GlobalConfig *config, int argc, /* Move onto the new config */ operation->next->prev = operation; operation = operation->next; /* Reset the flag indicator */ stillflags = TRUE; } else result = PARAM_NO_MEM; } else if(stillflags && ('-' == argv[i][0])) { char *nextarg; bool passarg; char *flag = argv[i]; if(curlx_strequal("--", argv[i])) /* This indicates the end of the flags and thus enables the following (URL) argument to start with -. */ stillflags = FALSE; else { nextarg = (i < (argc - 1)) ? argv[i + 1] : NULL; result = getparameter(flag, nextarg, &passarg, config, operation); if(!result && passarg) /* Reset result to continue */ result = PARAM_OK; } else if(!result && passarg) i++; /* we're supposed to skip this */ } } Loading
tests/data/test815 +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ imap IMAP STORE - delete message (CUSTOMREQUEST) </name> <command> imap://%HOSTIP:%IMAPPORT/815 -X 'STORE 123 +Flags \Deleted' -u user:secret : imap://%HOSTIP:%IMAPPORT/815 -X CLOSE imap://%HOSTIP:%IMAPPORT/815 -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/815 -X CLOSE </command> </client> Loading
tests/data/test816 +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ imap IMAP STORE - delete message with confirmation (CUSTOMREQUEST) </name> <command> imap://%HOSTIP:%IMAPPORT/816 -X 'STORE 123 +Flags \Deleted' -u user:secret : imap://%HOSTIP:%IMAPPORT/816 -X EXPUNGE imap://%HOSTIP:%IMAPPORT/816 -X 'STORE 123 +Flags \Deleted' -u user:secret -: imap://%HOSTIP:%IMAPPORT/816 -X EXPUNGE </command> </client> Loading