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:
// Make test file
fileID = OpenToWrite("test.txt" , 0)
WriteLine(fileID , "this is a test")
CloseFile(fileID)
// Attempt to send to unprotected dir
http = CreateHTTPConnection()
SetHTTPHost(http, "www.glasstowers.co.uk", 0)
SendHTTPFile(http,"jbs2/up.php","","test.txt")
// Wait for response
while GetHTTPResponseReady(http) = 0
Print( "Connecting..." )
Sync()
endwhile
response$ = GetHTTPResponse(http)
CloseHTTPConnection(http)
DeleteHTTPConnection(http)
// Main loop
do
Print( "Server response: " + response$ )
Sync()
loop
EXAMPLE 2: sending a file using a script in a protected dir does not work:
// Make test file
fileID = OpenToWrite("test.txt" , 0)
WriteLine(fileID , "this is a test")
CloseFile(fileID)
// Attempt to send to protected dir
http = CreateHTTPConnection()
SetHTTPHost(http, "www.glasstowers.co.uk", 0,"bob","This$is$a%Password1")
SendHTTPFile(http,"jbs/up.php","","test.txt")
// Wait for response
while GetHTTPResponseReady(http) = 0
Print( "Connecting..." )
Sync()
endwhile
response$ = GetHTTPResponse(http)
CloseHTTPConnection(http)
DeleteHTTPConnection(http)
// Main loop
do
Print( "Server response: " + response$ )
Sync()
loop
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):
http = CreateHTTPConnection()
SetHTTPHost(http, "www.glasstowers.co.uk", 0,"bob","This$is$a%Password1")
SendHTTPRequestASync(http, "jbs/up.php", "")
// Wait for response
while GetHTTPResponseReady(http) = 0
Print( "Connecting..." )
Sync()
endwhile
response$ = GetHTTPResponse(http)
CloseHTTPConnection(http)
DeleteHTTPConnection(http)
// Main loop
do
Print( "Server response: " + response$ )
Sync()
loop
Would someone else mind confirming that this is still a problem?
Thanks,
James