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?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Bill's avatar
58
Bill
updated 14 years ago, asked 14 years ago

Comments

Looks like indeed that line can be removed without obvious consequences. Thanks for catching this issue.
Evgeny's avatar Evgeny (14 years ago)
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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
updated 14 years ago, answered 14 years ago
link

Comments

Thanks Evgeny!
Bill's avatar Bill (14 years ago)
see more comments