OSQA and ajax request that go nowhere, missing rewrite rules

Repository of web frameworks and applications for Microsoft IIS.
User avatar
Posts: 14
Joined: 10 Mar 2014, 10:24

OSQA and ajax request that go nowhere, missing rewrite rules

21 Mar 2014, 07:57

Hello,

I don't get feedback from OSQA meta forum, so here is my question, because it's related to the fact I use OSQA on my IIS dedicated website (Windows 2008 R2) using latest stable Helicon Zoo package.

When I click on icons that run an ajax request of following urls the request times out because it has nowhere to go. I think I miss url rewrite rules in IIS ? I have no idea of how OSQA handles theses requests, since I read on OSQA meta these urls can be language related.

So here are the urls :

http://myforum.tld/accept_answer/48/
http://myforum.tld/vote/48/up/
http://myforum.tld/vote/48/down/

This misconfiguration prevents my forum to be fully functional.

Thank you very much for information.

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: OSQA and ajax request that go nowhere, missing rewrite r

21 Mar 2014, 11:36

Hello,

Could you show you real web site url to see this errors.

You can create private ticket at our support site if you do not want to show this url at forum.

Thanks.

User avatar
Posts: 14
Joined: 10 Mar 2014, 10:24

Re: OSQA and ajax request that go nowhere, missing rewrite r

25 Mar 2014, 05:53

Hi Ruslan,

Forum is located at http://forum.imagx.org, it has public access anyway.

I will PM you a test user account.

Thanks for looking,

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: OSQA and ajax request that go nowhere, missing rewrite r

25 Mar 2014, 12:01

Hello!

Thank you for reporting.

We have located the issue. Zoo module update will be released soon.

Thanks.

User avatar
Posts: 14
Joined: 10 Mar 2014, 10:24

Re: OSQA and ajax request that go nowhere, missing rewrite r

25 Mar 2014, 13:06

Very great !

Do I need to switch to beta feed or keep using stable Helicon feed?

Can you technically elaborate, just for my understanding?

Thank you again for this quick fix

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: OSQA and ajax request that go nowhere, missing rewrite r

26 Mar 2014, 11:17

Hello!

Sorry, the bug is not in Zoo module, the bug is in HttpRequest/WsgiRequest in Django 1.3.

Request object try to read input stream with POST-data event if Content-Length is 0.
https://github.com/django/django/blob/stable/1.3.x/django/http/__init__.py#L263

Since the input stream is empty, request processing stops (waiting to read from the empty stream).
This bug fixed in in Django 1.4 and above.

But the OSQA requires Django==1.3.7
https://github.com/dzone/osqa/blob/master/requirements.txt#L6

There are two ways to try to fix the issue.

1. Try to run OSQA on Django 1.4
2. Try to run OSQA app as HTTP server and use python.2.7.http Zoo engine.

Thanks!

User avatar
Posts: 14
Joined: 10 Mar 2014, 10:24

Re: OSQA and ajax request that go nowhere, missing rewrite r

26 Mar 2014, 12:18

So I go for the second solution, according to available time my boss gives me for this project and my technical skills. (See also http://jira.osqa.net/browse/OSQA-805)

I got a 500 error when going to IIS, Helicon Zoo icon, changing engine from "python.2.7.wsgi" to "python.2.7.http".

Can you point me to documentation/give me more information because I didn't even see some error in log. I assume I miss something to switch engines in a working state.
I read http://www.helicontech.com/zoo/module.htm but it didn't help a lot.

Thank you again,

User avatar
Posts: 14
Joined: 10 Mar 2014, 10:24

Re: OSQA and ajax request that go nowhere, missing rewrite r

27 Mar 2014, 05:02

I feel thrilled, it's solved!

Since OSQA website embed its own django, all I had to do was to edit [website root]/venv/Lib/site-packages/django/http/__init.py__ and change "self.read()" to empty string, at line 266:

Code: Select all
if content_length:
                self._raw_post_data = self.read(content_length)
            else:
                self._raw_post_data = '' # self.read()

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: OSQA and ajax request that go nowhere, missing rewrite r

27 Mar 2014, 07:42

It is good and easy solution :)

Thanks!

Return to Helicon Zoo

Who is online

Users browsing this forum: No registered users and 22 guests