JSON interface GET reply: Content-Type text/html instead of application/json

Bug #816639 reported by abdullahc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Alfanous - Quranic Search engine
Fix Released
Undecided
Unassigned

Bug Description

Hi/Salam,

I used Python without any problem, whereas using Javascript Chromium raises errors in JSON GET reply:

json:-1 Resource interpreted as Script but transferred with MIME type text/html.
json:3 Uncaught SyntaxError: Unexpected token :

Using Telnet:

$ telnet www.alfanous.org 80
Trying 178.32.28.116...
Connected to www.alfanous.org.
Escape character is '^]'.
GET /json?search=%D8%A3%D8%AD%D9%85%D8%AF HTTP/1.1
host: www.alfanous.org

HTTP/1.1 200 OK
Date: Tue, 26 Jul 2011 19:47:19 GMT
Server: Apache/2.2
Vary: User-Agent,Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

fd8

{"ayas": {"1": {"sajda": {"type": null, "exist": false, "id": null}, "sura": {"stat": {"ayas": 14, "letters": 945, "godnames": 17, "words": 221}, "order": 109, "type": "\u0645\u062f\u0646\u064a\u0629", "name": "\u0627\u0644\u0635\u0641", "id": 61}, "aya": {"text_uthmani": "\u0648\u064e\u0625\u0650\u0630\u0652 \u0642\u064e\u0627\u0644\u064e \u0639\u0650\u064a\u0633\u064e\u0649 \u0671\u0628\u0652\u0646\u064f \u0645\u064e\u0631\u0652\u064a\u064e\u0645\u064e \u064a\u064e\u0670\u0628\u064e\u0646\u0650\u0649\u0653 \u0625\u0650\u0633\u0652\u0631\u064e\u0670\u0653\u0621\u0650\u064a\u0644\u064e \u0625\u0650\u0646\u0651\u0650\u0649 \u0631\u064e\u0633\u064f\u0648\u0644\u064f \u0671\u0644\u0644\u0651\u064e\u0640\u0647\u0650 \u0625\u0650\u0644\u064e\u064a\u0652\u0643\u064f\u0645 \u0645\u0651\u064f\u0635\u064e\u062f\u0651\u0650\u0642\u064b\u0627 \u0644\u0651\u0650\u0645\u064e\u0627 \u0628\u064e\u064a\u0652\u0646\u064e \u064a\u064e\u062f\u064e\u0649\u0651\u064e \u0645\u0650\u0646\u064e \u0671\u0644\u062a\u0651\u064e\u0648\u0652\u0631\u064e\u0649\u0670\u0629\u0650 \u0648\u064e\u0645\u064f\u0628\u064e\u0634\u0651\u0650\u0631\u064b\u06e2\u0627 \u0628\u0650\u0631\u064e\u0633\u064f\u0648\u0644\u064d \u064a\u064e\u0623\u0652\u062a\u0650\u0649 \u0645\u0650\u0646\u06e2 \u0628\u064e\u0639\u0652\u062f\u0650\u0649 \u0671\u0633\u0652\u0645\u064f\u0647\u064f\u06e5\u0653 <span class=\"match term0\">\u0623\u064e\u062d\u0652\u0645\u064e\u062f\u064f</span> \u06d6 \u0641\u064e\u0644\u064e\u0645\u0651\u064e\u0627 \u062c\u064e\u0627\u0653\u0621\u064e\u0647\u064f\u0645 \u0628\u0650\u0671\u0644\u0652\u0628\u064e\u064a\u0651\u0650\u0646\u064e\u0670\u062a\u0650 \u0642\u064e\u0627\u0644\u064f\u0648\u0627\u06df \u0647\u064e\u0670\u0630\u064e\u0627 \u0633\u0650\u062d\u0652\u0631\u064c \u0645\u0651\u064f\u0628\u0650\u064a\u0646\u064c", "text": "\u0648\u064e\u0625\u0650\u0630\u0652 \u0642\u064e\u0627\u0644\u064e \u0639\u0650\u064a\u0633\u064e\u0649 \u0627\u0628\u0652\u0646\u064f \u0645\u064e\u0631\u0652\u064a\u064e\u0645\u064e \u064a\u064e\u0627 \u0628\u064e\u0646\u0650\u064a \u0625\u0650\u0633\u0652\u0631\u064e\u0627\u0626\u0650\u064a\u0644\u064e \u0625\u0650\u0646\u0651\u0650\u064a \u0631\u064e\u0633\u064f\u0648\u0644\u064f \u0627\u0644\u0644\u0651\u064e\u0640\u0647\u0650 \u0625\u0650\u0644\u064e\u064a\u0652\u0643\u064f\u0645\u0652 \u0645\u064f\u0635\u064e\u062f\u0651\u0650\u0642\u064b\u0627 \u0644\u0650\u0645\u064e\u0627 \u0628\u064e\u064a\u0652\u0646\u064e \u064a\u064e\u062f\u064e\u064a\u0651\u064e \u0645\u0650\u0646\u064e \u0627\u0644\u062a\u0651\u064e\u0648\u0652\u0631\u064e\u0627\u0629\u0650 \u0648\u064e\u0645\u064f\u0628\u064e\u0634\u0651\u0650\u0631\u064b\u0627 \u0628\u0650\u0631\u064e\u0633\u064f\u0648\u0644\u064d \u064a\u064e\u0623\u0652\u062a\u0650\u064a \u0645\u0650\u0646\u0652 \u0628\u064e\u0639\u0652\u062f\u0650\u064a \u0627\u0633\u0652\u0645\u064f\u0647\u064f <span class=\"match term0\">\u0623\u064e\u062d\u0652\u0645\u064e\u062f\u064f</span> \u0641\u064e\u0644\u064e\u0645\u0651\u064e\u0627 \u062c\u064e\u0627\u0621\u064e\u0647\u064f\u0645\u0652 \u0628\u0650\u0627\u0644\u0652\u0628\u064e\u064a\u0651\u0650\u0646\u064e\u0627\u062a\u0650 \u0642\u064e\u0627\u0644\u064f\u0648\u0627 \u0647\u064e\u0630\u064e\u0627 \u0633\u0650\u062d\u0652\u0631\u064c \u0645\u064f\u0628\u0650\u064a\u0646\u064c", "recitation": "http://www.versebyversequran.com/data/Alafasy_128kbps/061006.mp3", "id": 6, "traduction": null}, "stat": {"letters": 129, "godnames": 1, "words": 32}, "theme": {"chapter": "\u062e\u0627\u062a\u0645 \u0627\u0644\u0623\u0646\u0628\u064a\u0627\u0621 \u0645\u062d\u0645\u062f \u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064a\u0647 \u0648\u0633\u0644\u0645 ", "topic": "\u0645\u0639\u0631\u0641\u0629 \u0623\u0647\u0644 \u0627\u0644\u0643\u062a\u0627\u0628 \u0644\u0635\u0641\u0627\u062a\u0647", "subtopic": "-----"}, "position": {"rubu": 0, "manzil": 7, "hizb": 55, "page": 552}}}, "runtime": "0.00051", "suggestions": [], "words": {"1": {"nb_matches": 1, "word": "\u0623\u062d\u0645\u062f", "nb_ayas": 1}, "gl
5a
obal": {"nb_matches": 1, "nb_words": 1}}, "interval": {"start": 1, "total": 1, "end": 1}}

0

Connection closed by foreign host.

Revision history for this message
abdullahc (sneetsher) wrote :

Fixed within bug #816607.

Changed in alfanous:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.