Jump to content

HTTP 302 return code


Recommended Posts

I am using the http.au3 udf. I am trying to connect and login to rapidshare.com, but when i run this script i get a 302 response. Which is "Moved temporarily". This is the response i received:

Example POST Request:

Socket Created: 1816

Bytes sent: 229

HTTP Return Code: 302

HTTP Return Response: Moved Temporarily

Number of headers: 6

Size of data downloaded: 0 bytes

Page downloaded:

I hope someone can help me solving this!

Thanks in advance!

#include <Http.au3>

$host = "ssl.rapidshare.com"
$page = "/cgi-bin/premiumzone.cgi"
$vars = "login=******&password=******"
$vars = _HTTPEncodeString($vars)

ConsoleWrite(@CRLF&@CRLF&"Example POST Request:"&@CRLF)
$socket = _HTTPConnect("ssl.rapidshare.com",443)
ConsoleWrite("Socket Created: "&$socket&@CRLF)
$get = _HTTPPost($host, $page, $socket, $vars)
ConsoleWrite("Bytes sent: "&$get&@CRLF)
$recv = _HTTPRead($socket,1)
If @error Then
    ConsoleWrite("_HTTPRead Error: "&@error&@CRLF)
    ConsoleWrite("_HTTPRead Return Value: "&$recv &@CRLF)
Else
    ConsoleWrite("HTTP Return Code: "&$recv[0]&@CRLF)
    ConsoleWrite("HTTP Return Response: "&$recv[1]&@CRLF)
    ConsoleWrite("Number of headers: "&UBound($recv[3])&@CRLF)
    ConsoleWrite("Size of data downloaded: "&StringLen($recv[4])&" bytes"&@CRLF)
    ConsoleWrite("Page downloaded: "&@CRLF&$recv[4]&@CRLF)
EndIf

_HTTPClose($socket)
Link to comment
Share on other sites

I am using the http.au3 udf. I am trying to connect and login to rapidshare.com, but when i run this script i get a 302 response. Which is "Moved temporarily". This is the response i received:

I hope someone can help me solving this!

Thanks in advance!

two problems:

1.) I think your login data is incorrect, that's why you get a "302 Moved Temporarily". The webserver just directs you back to the login page. As I don't have a login I cannot test.

2.) There is most certainly a bug in http.au3, starting at line 280. It does not handle the return codes of the server properly. It cut's off the relevant HTTP headers, as StringRegExp() works different now. The code in http.au3 just checks @extended and NOT @error, which is for sure wrong.

So, no easy solution for your problem... Either contact the author of http.au3 to fix the bug, or have a look at the _IE* functions.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

  • 1 year later...

What I don't understand is how you could use AutoIt "incorrectly" by not having IE installed. I know that IE is deeply integrated in Windows, but isn't it possible to "uninstall" it? At least, to a degree?

I guess if I uninstall IE and proceed to use AutoIt, I am doing something incorrectly?

redblacktree

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