Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Paste Description for xbmc http handler patch

There is an error with the test code where it crashes XBMC when it tries to perform the connection test outside the US.

Also updated google's IP address.

xbmc http handler patch
Saturday, October 27th, 2007 at 12:10:15am MDT 

  1. Index: xbmc/utils/HTTP.cpp
  2. ===================================================================
  3. --- xbmc/utils/HTTP.cpp (revision 10626)
  4. +++ xbmc/utils/HTTP.cpp (working copy)
  5. @@ -280,7 +280,7 @@
  6.  {
  7.    CStdString strURL = "http://www.google.com";
  8.    if (!checkDNS)
  9. -    strURL = "http://66.102.7.99"; // www.google.com ip
  10. +    strURL = "http://74.125.19.103"; // www.google.com IP address
  11.    int status = Open(strURL, "HEAD", NULL);
  12.    Close();
  13.  
  14. @@ -926,7 +926,6 @@
  15.      case 302:
  16.        // 302 Found - auto redirect if this is a GET
  17.        //Post redirect has to work for scrapers
  18. -      //CanHandle = !stricmp(verb, "GET");
  19.        CanHandle = true;
  20.        break;
  21.      case 303:
  22. @@ -941,8 +940,10 @@
  23.      }
  24.  
  25.      Close();
  26. -
  27. -    if (!CanHandle)
  28. +   
  29. +    // pass through HEAD requests, as we assume that if you did a head request
  30. +    // you don't want to follow redirects etc.
  31. +    if (!CanHandle || !stricmp(verb, "HEAD"))
  32.      {
  33.        CLog::Log(LOGERROR, "Server returned: %d %s", status, strReason.c_str());
  34.        return status; // unhandlable

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
fantasy-obligation