Opened 9 years ago

Closed 9 years ago

#3306 closed defect (fixed)

Nominatim Issues on ajax query?

Reported by: itay@… Owned by: openstreetmap@…
Priority: blocker Milestone:
Component: nominatim Version:
Keywords: Cc:

Description

I am really confused here...

when ever i am doing an ajax request to nominatim i am getting an empty result back from nominatim the url i am sending is ok - as if i try to enter the url from the browser i success and getting a valid json result

i had checked the request a bit more at firebug as i am getting 200 OK message - but the response is RED as an exception using jquery - once i send the request i am being led into the ajaxError method and not the Success one. as it does look like i am getting an exception

after checking the javascript params which are (httprequest, testmessage, exception) i am getting testmessage = 'error' and my exception is null??

example url: http://nominatim.openstreetmap.org/search?q=%D7%99%D7%A8%D7%95%D7%A9%D7%9C%D7%99%D7%9D&accept-language=heb&format=json&polygon=1

i am pretty sure the code works as the code DID work in the past and stopped working the end of last week

to be even more sure i had rolled few versions back using SVN and the issue still remained

I have also uploaded with this some images if needed to show the params of the http request

I had just run tough everything i could and didn't success to find a problem from my side as i am sending a fine http request but not getting a response

Attachments (2)

Firebug Screenshots.rar (104.6 KB) - added by itay@… 9 years ago.
Firebug Screenshots
chrome-english-result.jpg (95.8 KB) - added by itay@… 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by itay@…

Attachment: Firebug Screenshots.rar added

Firebug Screenshots

comment:1 Changed 9 years ago by itay@…

i had made a test in english - same results also uploaded another image from chrome on that request please look at the first exception chrome sends " XMLHttpRequest cannot load http://nominatim.openstreetmap.org/search?q=york&accept-language=heb&format=json&polygon=1. Origin http://localhost:3460 is not allowed by Access-Control-Allow-Origin. "

I'm not as sure 100% what does this means - tought maybe some security issues My OS is win7 tried running this also from a differente machine with win2003 with the same results

Changed 9 years ago by itay@…

Attachment: chrome-english-result.jpg added

comment:2 Changed 9 years ago by twain

Resolution: worksforme
Status: newclosed

I don't believe that chrome supports Access-Control-Allow-Origin which means all cross site scripting is blocked. You can use the callback function instead or proxy through a script on your own server.

Test in firefox (3.5) to confirm - it does support Access-Control-Allow-Origin.

comment:3 Changed 9 years ago by twain

Resolution: worksforme
Status: closedreopened

comment:4 Changed 9 years ago by twain

Resolution: fixed
Status: reopenedclosed

Apologies - I added a typo. Miss-spelt json as josn in one place! Now fixed.

Note: See TracTickets for help on using tickets.