Recently I started working on a little Aspen project. Today I tried to
read form data submitted via POST request. The keys are using lower
and upper case letters. The request object doesn't gave me the
expected result, this returned nothing:
request.header.one('myVar')
I created a fork on Github and fixed that bug.
https://github.com/falstaff84/aspen/commit/840d960d11ecc0586c3f1a384b31032db39cce62
There are some other problems with the request object: The has method
doesnt exist (i'm using __contains___ now), but this also use .lower()
to get the value from the dictionary. Now, either the add method
should use .lower() as well, or we should remove all those .lower()
when accessing the dictionary.
What was the idea of using .lower() here? Have the keys to be case
insensitive? Is there a standard which defines that?
Thanks
falstaff
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Hi Chad,
Yeah I got that! In my Github repository I added some patch which also took care of that. It seems to work pretty well, fell free to pull from my tree :-) Cheers
Stefan
Am 21.06.2011 16:18, schrieb Chad Whitacre:
Thanks for catching that Stefan. It's more complicated because the underlying object is also used for HTTP headers, which do need to be case insensitive.
chad
On Mon, Jun 20, 2011 at 6:13 AM, Stefan Agner <fals...@deheime.ch <mailto:fals...@deheime.ch>> wrote:
Hello,
Recently I started working on a little Aspen project. Today I tried to read form data submitted via POST request. The keys are using lower and upper case letters. The request object doesn't gave me the expected result, this returned nothing:
request.header.one('myVar')
I created a fork on Github and fixed that bug.
There are some other problems with the request object: The has method doesnt exist (i'm using __contains___ now), but this also use .lower() to get the value from the dictionary. Now, either the add method should use .lower() as well, or we should remove all those .lower() when accessing the dictionary.
What was the idea of using .lower() here? Have the keys to be case insensitive? Is there a standard which defines that?
Thanks
falstaff
------------------------------__------------------------------__----
This message was sent using IMP, the Internet Messaging Program.
--To post to this group, send email to aspen...@googlegroups.com <mailto:aspen-users@googlegroups.com>.
You received this message because you are subscribed to the Google Groups "aspen-users" group.
To unsubscribe from this group, send email to aspen-users+unsubscribe@__googlegroups.com <mailto:aspen-users%2Bunsu...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/__group/aspen-users?hl=en <http://groups.google.com/group/aspen-users?hl=en>.