First time here? Check out the FAQ!
1

Problem with setting the request encoding?

I setup Askbot and it was working fine for about a day, but then today I was having issues logging in. After checking the logs it was clear that for some reason the LoginForm wasn't getting the POST data. Some debugging showed that in askbot/deps/django_authopenid/views.py on line 271 in the signin function/view the problem:

request.encoding = 'UTF-8'

Simply commenting that line out seemed to fix the problem and I'm now able to login, but any clue why this was happening? Also, what's the benefit of setting the encoding here?

Bill's avatar
58
Bill
updated 2011-01-20 12:02:57 -0500, asked 2011-01-20 12:01:54 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Looks like indeed that line can be removed without obvious consequences. Thanks for catching this issue.
Evgeny's avatar Evgeny (2011-01-20 13:27:23 -0500) edit
add a comment see more comments

1 Answer

0

Bill, you are right, the request parameters should not be modified by the code. The form data encoding should be set in the form tag instead or handled automatically.

I will update this by tomorrow in a new minor release. Thanks.

Evgeny's avatar
13.2k
Evgeny
updated 2011-01-20 12:28:22 -0500, answered 2011-01-20 12:24:57 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks Evgeny!
Bill's avatar Bill (2011-01-20 13:50:02 -0500) edit
add a comment see more comments