Why does resp store the page content in some cases and not in other cases?

Discussion in 'Server and Client Scripting' started by Lutra, Jul 17, 2010.

  1. Lutra

    Lutra All Gen Battler/Scripter

    Joined:
    Apr 25, 2010
    Messages:
    509
    Likes Received:
    188
    PO Trainer Name:
    Lutra
    I've been using this script to see what resp is storing. It basically sendalls the resp variable. For some cases, resp is containing the content of the page - but for other cases, it isn't.

    Code (text):
    1. ({
    2.  
    3. afterNewMessage: function(message){
    4.     if (message == "Script Check: OK"){
    5.         sys.webCall(url, "sys.sendAll(resp);");
    6.     }
    7. }
    8.  
    9. })
    For example:

    http://pokemon-online.eu/ works.
    http://www.pokemon-online.eu/forums/forum.php doesn't work.

    Any ideas on what prevents the resp variable from storing the content?
     
  2. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
  3. Lutra

    Lutra All Gen Battler/Scripter

    Joined:
    Apr 25, 2010
    Messages:
    509
    Likes Received:
    188
    PO Trainer Name:
    Lutra
    That doesn't seem to work either.
     
  4. Astruvis

    Astruvis Banned

    Joined:
    May 14, 2010
    Messages:
    217
    Likes Received:
    0
    Isn't it because it can only fetch uns2 or w/e its called?
     
  5. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    I solved the bug.

    It was because some sites used windows line break instead of unix line breaks.

    ... not an intuitive answer at all, but that was the reason.