Modify

Opened 16 years ago

Closed 16 years ago

#814 closed Bug (Fixed)

HttpSetProxy - proxy with credentials

Reported by: Xenobiologist Owned by: Valik
Milestone: 3.3.1.0 Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: HttpSetProxy Cc: Valik

Description

See here : http://www.autoitscript.com/forum/index.php?showtopic=88991

Using HttpSetProxy with credentials which means option 2 and then using InetGet does not seem to work

Little script:

#include<Inet.au3>
Global $user = 'xxx'
Global $pass = 'xxx'
Global $url = 'www.autoit.de'
Global $proxy = 'proxy.xxx.de:8080'

ConsoleWrite('!Proxy2 : ' & HttpSetProxy(2, $proxy, $user, $pass) & @CRLF) ; retunrs 1
Global $siteContent = _INetGetSource($url) 
ConsoleWrite($siteContent & @CRLF) ; cache access denied
ConsoleWrite('! - - - ' & @CRLF)
Global $siteContent = _INetGetSource($user & ":" & $pass & "@" & $url) 
ConsoleWrite($siteContent & @CRLF) ; works good
ConsoleWrite(InetGet($user & ":" & $pass & "@" & $url, @DesktopDir & '\test.gmx') & @CRLF) ; returns 0
ConsoleWrite(InetGet($url, @DesktopDir & '\test.txt') & @CRLF) ; returns 0

Mega

Attachments (0)

Change History (6)

comment:1 Changed 16 years ago by Jpm

  • Owner set to Jon
  • Status changed from new to assigned

I hope some dev have access to a proxy protected. I don't.
Please Jon.

comment:2 Changed 16 years ago by /dev/null

_INetGetSource() uses the api call InternetOpen().

From Inet.au3:
Local $ai_IO = DllCall($h_DLL, 'int', 'InternetOpen', 'str', "AutoIt v3", 'int', 0, 'int', 0, 'int', 0, 'int', 0)

HOWEVER: It does NOT set any proxy settings. All proxy related parameters are set to 0. See here:

http://msdn.microsoft.com/en-us/library/aa385096(VS.85).aspx

Conclusion: _InetGetSource does not support proxy usage. InetGet() is different!

Cheers
Kurt

comment:3 Changed 16 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from assigned to closed

You right Kurt,
don't mix basic function as HttpSetProxy() and UDF.
If such parameters are needed for the UDF just extend the UDF.

comment:4 Changed 16 years ago by Valik

  • Resolution No Bug deleted
  • Status changed from closed to reopened

Err, I'm not done with this ticket yet, don't close it.

comment:5 Changed 16 years ago by Valik

  • Owner changed from Jon to Valik
  • Status changed from reopened to accepted

comment:6 Changed 16 years ago by Valik

  • Milestone set to 3.3.1.0
  • Resolution set to Fixed
  • Status changed from accepted to closed

Fixed in version: 3.3.1.0

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Valik.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.