Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7585163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:06:30+00:00 2026-05-30T19:06:30+00:00

In my web app I’m making a CURL call to Google’s (unofficial) weather API

  • 0

In my web app I’m making a CURL call to Google’s (unofficial) weather API at:

http://www.google.com/ig/api?weather=,,, ...

This works fine in all cases except when the page involved is accessed in Opera. When accessed in Opera, instead of the weather I get the following in the xml response:

301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/m/ig">here</A>.

How can I fix this? I’ve seen some suggestions around the web that clearing the cache is a solution, but that hasn’t worked for me. Note I’m particularly concerned with Opera Mini.

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:06:32+00:00Added an answer on May 30, 2026 at 7:06 pm

    Update 2012-06-20: Tested with Opera 12 and Google has fixed the sniffing issue it seems.

    I do not think you can fix it. It would be interesting to know why Google does server-side user agent sniffing and redirects Opera to another URI. Could you paste the full weather URI, so we can test it at Opera ourselves? If do a get of the one you have given into Opera I get

    <xml_api_reply version="1">
    <weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0">
    <problem_cause data=""/>
    </weather>
    </xml_api_reply>
    

    I also do not get a redirection, but I guess it is because the URI is not the one you have used.

    % curl -sI "http://www.google.com/ig/api?weather=,,,"
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=ISO-8859-1
    Date: Fri, 02 Mar 2012 12:04:44 GMT
    Pragma: no-cache
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Cache-Control: no-cache, no-store, must-revalidate
    Set-Cookie: PREF=ID=fe13590e95ceb98e:TM=1330689884:LM=1330689884:S=h1eocRzhNcZ_Kwoa; expires=Sun, 02-Mar-2014 12:04:44 GMT; path=/; domain=.google.com
    X-Content-Type-Options: nosniff
    Server: igfe
    X-XSS-Protection: 1; mode=block
    Transfer-Encoding: chunked
    

    More details will help, and I will complete here.

    Update 2012-03-12 First I tried with a simple curl.

    → curl -sI "http://www.google.com/ig/api?weather=,,,40735500,-73986500"
    
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=ISO-8859-1
    Date: Mon, 12 Mar 2012 13:16:43 GMT
    Pragma: no-cache
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Cache-Control: no-cache, no-store, must-revalidate
    Set-Cookie: PREF=ID=9bc71bbf2edb7ebb:TM=1331558203:LM=1331558203:S=K5Ew69E5IsYhA0s8; expires=Wed, 12-Mar-2014 13:16:43 GMT; path=/; domain=.google.com
    X-Content-Type-Options: nosniff
    Server: igfe
    X-XSS-Protection: 1; mode=block
    Transfer-Encoding: chunked
    

    Then with Opera User agent.

    → curl -sI -A "Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; fr) Presto/2.10.229 Version/11.61" "http://www.google.com/ig/api?weather=,,,40735500,-73986500"
    
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=UTF-8
    Date: Mon, 12 Mar 2012 13:17:47 GMT
    Pragma: no-cache
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Cache-Control: no-cache, no-store, must-revalidate
    Set-Cookie: PREF=ID=54cc62619394059e:TM=1331558267:LM=1331558267:S=JRCO-WNJMUNMMHsO; expires=Wed, 12-Mar-2014 13:17:47 GMT; path=/; domain=.google.com
    X-Content-Type-Options: nosniff
    Server: igfe
    X-XSS-Protection: 1; mode=block
    Transfer-Encoding: chunked
    

    And finally with Firefox User Agent

    → curl -sI -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0" "http://www.google.com/ig/api?weather=,,,40735500,-73986500"
    
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=UTF-8
    Date: Mon, 12 Mar 2012 13:20:09 GMT
    Pragma: no-cache
    Expires: Fri, 01 Jan 1990 00:00:00 GMT
    Cache-Control: no-cache, no-store, must-revalidate
    Set-Cookie: PREF=ID=ab709995945767a8:TM=1331558409:LM=1331558409:S=bom-8pa-x9gGY5Sb; expires=Wed, 12-Mar-2014 13:20:09 GMT; path=/; domain=.google.com
    X-Content-Type-Options: nosniff
    Server: igfe
    X-XSS-Protection: 1; mode=block
    Transfer-Encoding: chunked
    

    There is a no X-Content-Type-Options: nosniff in all cases and no redirection. What is the user agent you are using. You can type about:opera in the addressbar and the user agent string will appear.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a minimal web app that you can download here (6Kb): http://www.mediafire.com/?6vo1tc141t65r1g the
A Web App built with Google Apps Script has a Url link like this:
My web app is running in Tomcat at http://localhost:8080/example.com/ but it is being reverse
WEB APP not native, no Objective-C This is so simple it hurts. <input type=date
My web app builds a batch request to the Facebook graph API. The batch
My web app, up until this point, has been fairly straight forward. I have
My web-app has this secret place only some people are allowed to use. When
My web app generates ics files. These can be read successfully by Google Calender,
Our web app uses the Google CDN to link to the jQuery library and
my web-app has this: $(window).bind('beforeunload', function() { if(unSavedChanges == true) { return 'You have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.