2 Replies Latest reply on May 8, 2017 11:32 PM by RorohikoKris

    Slowly HTTP/1.1

    robertm43450875 Level 1

      Hi

       

      When i use HTTP/1.1 protocol version response is very slowly

      When i use HTTP/1.0 protocol version response is fast

       

      Can i modify script to use protocol HTTP/1.1 fast ??

       

      conn = new Socket;

        if (conn.open(parseUrl.host + ':' + parseUrl.port, "BINARY")) {

            var request =

                "GET /" + parseUrl.path + " HTTP/1.0\r\n" +

                "Host: " + parseUrl.host + ':' + parseUrl.port +  "\r\n" +

                "User-Agent: InDesign ExtendScript\r\n" +

                "Accept: text/xml,text/*,*/*\r\n" +

                "Accept-Encoding:\r\n" +

                "Connection: keep-alive\r\n" +

                "Accept-Language: *\r\n" +

                "Accept-Charset: utf-8\r\n\r\n";

                alert(request);

            conn.write(request);

            var reply = conn.read(999999);

            var response = getBodyFromResponse(reply);

            conn.close();

            return response;

       

      Thanks