Jump to content

InetGet and winhttp errors on Windows 7


 Share

Recommended Posts

Windows 7 Ultimate SP1 x64

Old program, already compiled, working perfectly so far.

Now, all of a sudden, not working.

Also, new test not working.

#include <IE.au3>
#include <INet.au3>
#include <String.au3>
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <File.au3>

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "http://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Pachygrapsus_marmoratus_2009_G4.jpg/333px-Pachygrapsus_marmoratus_2009_G4.jpg")
;$oHTTP.setTimeouts(5000, 5000, 15000, 15000)
$oHTTP.Send()
$oHTTP.WaitForResponse
$source = $oHTTP.Responsetext
FileWrite(@ScriptDir & "\333.jpg", $source)

InetGet("http://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Pachygrapsus_marmoratus_2009_G4.jpg/333px-Pachygrapsus_marmoratus_2009_G4.jpg", @ScriptDir & "\inet.jpg", 1)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : @ScriptDir = ' & @error & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

333.jpg file is 4 bytes long. Partial download, only the JPG header (ÿØÿà)

inet.jpg file is NOT present, error 13.

The exact same script is also not working under Windows XP, but with different results.

333.jpg file is 4 bytes long. Partial download, only the JPG header (ÿØÿà)

inet.jpg file is OK.

Teste with different URLs, from different sites, same result.

Firewall is off. All other settings ar eexactly the same as before, when compiled program was running.

Link to comment
Share on other sites

Can you verify the website resource that you are requesting (333.jpg and inet.jpg) is returning a HTTP statuscode of 200 OK?

Any other code returned from the server is an error (or otherwise irrelivant, like the redirects), and would explain the results across mulitple OS's.

The first four bytes might be coming from a HTTP HEAD request.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

SOLVED: I had some stupid virus and it set a proxy to Internet Explorer.

Opera, my regular browser, was working fine, so I did not checked IE.

Removed proxy settings, program is again working perfectly !!!!

And Windows XP is on vmware, for testing, probably already virused.

Windows 7, main machine, is working perfectly !

Edited by queensoft
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...