Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Not fixed: SendHTTPFile and protected dirs

Author
Message
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 31st Jul 2015 14:50 Edited at: 31st Jul 2015 14:55
Hi,

I'm referencing this problem:

https://code.google.com/p/agk/issues/detail?id=634

It says that the issue is fixed, but it doesn't seem to be working still over here. When I try to call the php script within a protected dir using SendHTTPFile, the server response var is blank.

Other HTTP commands, e.g. SendHTTPRequestASync() do work with scripts in the protected directory, so I know that the http connection (including the username and password) is correct.

SendHTTPFile() works correctly when the dir is not protected.

I've set up a couple of test dirs on my server to show you what I mean...

EXAMPLE 1: sending a file using a script in an unprotected dir works:




EXAMPLE 2: sending a file using a script in a protected dir does not work:




EXAMPLE 3: Connecting to the script in the protected dir with a different http command does work (even though, obviously, no file transfer is involved):




Would someone else mind confirming that this is still a problem?

Thanks,

James
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Aug 2015 10:12 Edited at: 1st Aug 2015 10:15
maybe u need the secure flag.
if you use http everybody can read the data.
the login make no sense with http i think so.
integer SetHTTPHost( iHTTP, szHost, iSecure, szUser, szPass )
Quote: "iSecure - Set to one to use an HTTPS secure connection,"


i believe this returns also a -1, it so you stay in a loop
SetHTTPResponseReady
Quote: "Returns 0 if the request is still in progress, or -1 if the request failed. "


did you get something in here?
GetErrorOccurred()
GetLastError()

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 1st Aug 2015 13:00
Hi Markus,

There is a response received - it's just blank. When the folder is not protected, the response comes through correctly.

The secure flag causes AppGameKit to make a https: connection (and eventually that's what I'm going to use).

I can't see how this isn't a bug. It's been mentioned before (https://code.google.com/p/agk/issues/detail?id=634) but was flagged as fixed. The protected folder connection does work for SendHTTPRequestASync(), but not for SendHTTPFile().

Thanks,

James
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Aug 2015 17:50 Edited at: 1st Aug 2015 17:51
without u got -1 fail at response.
with secure flag 1 i got 404 response.



AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 1st Aug 2015 18:08
Hi Markus

Thanks for trying it. The 404 error you got was, I think, caused by this:

SetHTTPHost(http, "www.glasstowers.co.uk", 1,"bob","This$is$a%Password1")

The 1 flag causes AppGameKit to attempt a https: connection. I don't have a https: connection yet.

Using your code but adjusting it slightly, this (to an unprotected dir) works



.. but this doesn't (to a protected dir)




Thanks again,

James
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Aug 2015 22:48 Edited at: 1st Aug 2015 22:55
ahh agree, i test it with the firefox itself.
the 404 comes at https
with http and without a file i got Error: filetype as result from firefox.
without secure there comes a fail and no error message.

hmm i think the issue you have can paul better clarify.

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 2nd Aug 2015 00:39
Markus - I appreciate the time you've spent testing this. Thanks very much

Does anyone know how I report this as an issue? Does Paul read these posts?

Ta,

James

Login to post a reply

Server time is: 2024-11-25 19:26:20
Your offset time is: 2024-11-25 19:26:20