Open FerrazArthur opened 1 year ago
Could you try please:
curl localhost:3000/?--tamanho=20\&--imprime
With this URL, for me the argv contains
/
--tamanho=20
--imprime
I thought i had tried it already, but it actually worked this time! thank you for the help, really appreciate.
I'm currently working with the WAGI interface and I'm facing an issue when trying to pass multiple arguments to a C to WebAssembly (WASM) handler. The handler code uses argv to iterate through arguments. While I've been successful in passing individual arguments like '--tamanho=10000' or '--help' with QUERY_STRING, I'm struggling to pass multiple arguments.
Valid Arguments:
Problem: I need to pass multiple arguments simultaneously, such as --tamanho=20 and --imprime, but I haven't been able to do this successfully.
Attempts: I've tried various ways to pass these multiple arguments, but none of them have worked:
Expected Behavior: I should be able to pass multiple arguments, such as --tamanho=20 and --imprime, to the handler via the URL, and the handler should be able to correctly interpret and process these arguments.
Actual Behavior: None of the above methods have successfully allowed me to pass multiple arguments to the WAGI handler in such a way that the argv[] identify them individually. Please advise on the correct way to pass multiple arguments in this scenario or provide a solution to this issue. In order to bypass this, i changed the design of the arguments string, but thats not ideal for my use case.
Thank you for your assistance in resolving this problem.