SSL requests with proxies - WeOnlyDo Discussion board

SSL requests with proxies (General questions)

by stevenq, Sunday, January 11, 2009, 00:24 (5795 days ago)

I've been having difficulty getting a response for https request when I use a proxy. I'm debuging the problem by downloading an image via https, but keep in mind a simple html GET request gives the same results.

When I use https in the URL, the control returns a blank header, jumps to the Connected - idle state, and never reaches the _DONE event. If I switch the URL to http it works fine. Also when I try without the proxy I've never had a problem. I'm hoping you can clue me in to a setting I'm forgetting about.

Here's a VB.NET code I've been testing with:

Private WithEvents HTTPX As New wodHttpDLXCom
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
HTTPX = New wodHttpDLXCom
AddLicense()
End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

HTTPX.URL = https://a248.e.akamai.net/sec.yimg.com/i/reg/headers/yahoo-us.gif
HTTPX.Response.Filename = C: est.gif
HTTPX.ProxyType = ProxyTypes.ProxyWEBStandard
HTTPX.ProxyAuthentication = HttpAuthentications.AuthNone
HTTPX.ProxyHostname = 83.138.169.229
HTTPX.ProxyPort = 3128
HTTPX.Connect()

End Sub

Private Sub HTTPX_Connected() Handles httpx.Connected
httpx.Get()
End Sub

Private Sub HTTPX_Done(ByVal ErrorCode As Long, ByVal ErrorText As String) Handles HTTPX.Done
MsgBox( yay )
End Sub


I'm fairly certain the proxy in the sample is capable of SSL, regardless I've tried with others and still received the same results. I've also tried setting httpx port to 443, and setting the secure value to anything doesn't help either.

Re: SSL requests with proxies

by wodDamir, Sunday, January 11, 2009, 16:06 (5794 days ago) @ stevenq

Hi Steven,

Can you please try something like this:

[code] http1.ProxyType = wodHttpDLXComLib.ProxyTypes.ProxyWEBStandard
http1.ProxyAuthentication = wodHttpDLXComLib.HttpAuthentications.AuthNone
http1.ProxyHostname = 83.138.169.229
http1.ProxyPort = 3128
http1.Response.Filename = C: est.gif
http1.Get( https://a248.e.akamai.net/sec.yimg.com/i/reg/headers/yahoo-us.gif )[/code]

I tried it on my side, and it works like a charm.

Regards,
Damba

Re: SSL requests with proxies

by stevenq, Monday, January 12, 2009, 02:55 (5794 days ago) @ wodDamir

The request seems to work when I cut out the connect method like you did. It's cool for this debug program but in my main app I like to be in control of the connect event, mainly so I can see when a proxy doesn't connect.
I might be able to modify it to work like this, but is there any way of getting an HTTPS request while using the connect call and event handler? I don't see why it's even an issue, if the URL is set to an HTTPS URL the control should take care of it instead of freezing...

Thanks for the help,
Steven

Re: SSL requests with proxies

by woddrazen, Monday, January 12, 2009, 09:18 (5793 days ago) @ stevenq

Steven,


I think I duplicated your problem. I will forward it now to our developers to see why it happened.

You should receive response from them when we have more about your issue.


Drazen

Re: SSL requests with proxies

by woddrazen, Monday, January 12, 2009, 12:02 (5793 days ago) @ woddrazen

Steven,


Your problem should be fixed.

You can request update here:
http://www.weonlydo.com/index.asp?update=1

but make sure that checkbox:

I prefer to download directly (package without source code)

is unchecked.

That version isn't yet digitally signed. It will be fully uploaded at the end of day.

Can you please try that version and let u know how it goes?


Drazen

Re: SSL requests with proxies

by stevenq, Monday, January 12, 2009, 17:22 (5793 days ago) @ woddrazen

Alright thanks!
I kind of figured it was something they would want to fix. Glad I was able to bring it to your attention, maybe it will save somebody else some trouble at some point.
I'll try it out in a bit, I'm confident it will work [:wink:]

Re: SSL requests with proxies

by stevenq, Monday, January 12, 2009, 18:53 (5793 days ago) @ stevenq

So I tried it out and got it to work...but just so you know I had to switch my Get() call to the StateChange event with an if for Connected - idle

I just tried some debugging and it seems the only time the Connected event fires is when you use a proxy and an https url.
If you don't use a proxy, https or http, and if you use a proxy and http, the event does not fire.

Pretty strange, sorry if i made you guys break it haha

thanks again,
Steven

Re: SSL requests with proxies

by stevenq, Monday, January 12, 2009, 19:07 (5793 days ago) @ stevenq

Also I've just come to realize that using the StateChange method like I mentioned, it fails to fire the DONE event when you are using a proxy. It works without one but when you use a proxy the Connected - idle state occurs twice, and the second time it freezes there. So this isn't a proper solution.

I could still solve the problem by going straight to the Get() method like you first suggested, but I figure you want all aspects of the control to work.

Hope I'm helping more than I'm annoying...

Re: SSL requests with proxies

by wodDamir, Monday, January 12, 2009, 20:11 (5793 days ago) @ stevenq

Steven,

I believe i have duplicated this behaviour. I've sent it to our programmers to check it out.

We will let you know more as soon as we have news on this.

Regards,
Damba

Re: SSL requests with proxies

by wodDamir, Monday, January 12, 2009, 22:13 (5793 days ago) @ wodDamir

Steven,

this should be solved now. Please download the latest version and try it out.

Regards,
Damba

Re: SSL requests with proxies

by steve, Tuesday, January 13, 2009, 01:22 (5793 days ago) @ wodDamir

everything seems okay on this end now
good job, thanks again for the help!