[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] MHD_GET_ARGUMENT_KIND

From: Christian Grothoff
Subject: Re: [libmicrohttpd] MHD_GET_ARGUMENT_KIND
Date: Mon, 27 Feb 2012 21:57:46 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20120207 Lightning/1.0b1 Icedove/3.0.11

On 02/27/2012 09:41 PM, Erik Smith wrote:
The arguments don't come back in the order they appear.  Is that a bug?

Good question. The API does not specify that they have to come back in the order that they appear, so one could argue that no. The reason is also clear: during parsing, we prepend them to a linked list, and then access that list in-order later, so the order is exactly reversed. But that's also not technically guaranteed by the API specification as written. The code is (very slightly) smaller and easier to understnad for prepending then appending, OTOH if I read your question right, this seems to violate the 'principle of least surprise', at least for you...

So, is it a bug? Not in a narrow sense. I could be convinced to document the issue, or if you have a very good argument for why a reverse-order list is not acceptable, it might be possible to convince me to 'append' instead ;-).

Happy hacking!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]