Announcement

Collapse
No announcement yet.

HTTP Object

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP Object

    HTTP Object with protected web folders
    I have put the same simple text file in two locations on the web. The HTTP object works great on the simple url.
    The HTTP object fails on the longer url that includes a user name and passord for login.
    The long url string works fine when pasted into the browser address bar but the exact same string fails in the HTTP Object.
    Can anyone help with this? The user name and password in the code are for a valid account.

    PHP Code:
    var ip = new Array();                 // Internet Paramters
        
    var InitialPass true;               // First Loop in main 
        
    function preMain() {    
        }
        function 
    main() {
           if (
    InitialPass true) {        
                if ( 
    isLastBarOnChart() == true ) {
                    
                    
    //  Long Protected URL defined by st below won't work.
                    
    var st "http://www.ramp-member-area.com/amember/plugins/protect/new_rewrite/login.php?";
                    
    st st "v=-24,20,19,18&";
                    
    st st "url=/ramp-scripts/test.txt&";
                    
    st st "amember_login=guest1&";
                    
    st st "amember_pass=testpassword";
                    
                    
    // Simple test url that works fine.
                    // st = "http://www.ramprt.com//test.txt";
                    
    debugPrintln(st);
                
                    var 
    0;
                    var 
    = new HTTP(st);
                    
    v.open("rt");  
                    if(
    v.open()) {
                        
    debugPrintln("start");
                        for (
    16; ++i) {
                            
    ip[i] = v.readln();
                        }
                    }
                    
    //f = null;
                    
    debugPrintln(ip);
                    
    debugPrintln("end");
                    
    InitialPass false;
                }
           }
           return;
        } 
    Thank you.
    Andy Skinner
    Andy Skinner

  • #2
    nebadawn
    When you use longer URL that includes a user name and password for login your request transforms into two requests as you can see at the picture below.

    Request is redirected (http status = 302). Unfortunatly HTTP object in 11.x versions do not handle such situations. A task for improvement has been added to our tracking system.
    eSignal_AlexeyG

    Comment


    • #3
      HTTP Redirect Limitation Work Around

      AlexeyG,
      Thank you for your help. I am working on a project to add Automatic Trendlines and Pattern Recognition to eSignal. All of the Pattern Recognition code is already written in VB6.0 and VB.net. The biggest problem for me is EFS limitations in HTTP, external exe and dll program calls, plus code security issues. This all has to be handled before I can add any pattern code.
      I am new to EFS and working through these issues one at a time. I can work around the redirect issue by providing the eSignal user an external program (.net exe) that he must run one time to add his user name to the allowed users. This .net program will handle the redirect and all subscription issues I had hoped to do in the efs itself. The next logical question is, why not have the efs simply download and start the .net exe so the user does not have to? In the .net environment this is a “shell” command. I have not yet found a way to run an external exe from an efs. I will be working on this today and if you have any suggestions I would love the help.
      Thank you.
      Andy Skinner
      Andy Skinner

      Comment

      Working...
      X