Ask Your Question
1

Problem with setting the request encoding?

asked 2011-01-20 12:01:54 -0600

Bill gravatar image

updated 2011-01-20 12:02:57 -0600

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?

edit retag flag offensive close merge delete

Comments

Looks like indeed that line can be removed without obvious consequences. Thanks for catching this issue.
Evgeny gravatar imageEvgeny ( 2011-01-20 13:27:23 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-01-20 12:24:57 -0600

Evgeny gravatar image

updated 2011-01-20 12:28:22 -0600

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.

edit flag offensive delete link more

Comments

Thanks Evgeny!
Bill gravatar imageBill ( 2011-01-20 13:50:02 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-01-20 12:01:54 -0600

Seen: 146 times

Last updated: Jan 20 '11