Jump to content

WinHTTP get redirected location


quarqo
 Share

Go to solution Solved by trancexx,

Recommended Posts

1 hour ago, agivx3 said:

Could you please take a look at this one too?

There's a difference between getting a response code saying that a resource's location has moved (3xx) and a web server fulfilling a request for a given resource by processing the request for you (from wherever it may reside).  The prior is being handled on the client-side (browser, script, etc.) and the former is handled server-side (web server, reverse proxy server, etc.).  Your first URL gave a response code 302, meaning the location has temporarily moved.  Your new URL gave a response code 200, meaning the request was successful, and the downloading of the file was initiated -- not a redirection (3xx).

Requested URL: https://chromeenterprise.google/browser/download/?platform=WIN_MSI&channel=stable&usagestats=0
HTTP Status:   200 OK

HTTP Response:
<!DOCTYPE html>
<html lang="en">
  <head>
<meta charset="utf-8">
<meta name="no_page_title" value="true"/>
.
.
.

 

Edited by TheXman
Link to comment
Share on other sites

I unterstand the difference of the response codes. But my goal is downloading the file. The second example gives me nothing back that i could use with inetget().
My knowlegde of HTTP is too low to understand what i have to do to get it working. So i have one more question...

Is it maybe possible using the winhttp.au3 for downloading the file in the sample code you created when the response code is 200?

Thx for helping 🙂
 

 

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...