Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Using TLS/DTLS with Titan test ports part 4(HTTPS with the HTTP port)
Using TLS/DTLS with Titan test ports part 4 [message #1755290] Thu, 02 March 2017 08:02 Go to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Chapter 5. The HTTP test port (https://github.com/eclipse/titan.TestPorts.HTTPmsg) (requires the Abstract Socket https://github.com/eclipse/titan.TestPorts.Common_Components.Abstract_Socket)

HTTPS, or HTTP secure, is just another name for HTTP/TLS/TCP ; the HTTP test port , assisted by the kernel and OpenSSL,
covers all three protocol layers.

As before, we use the latest available OpenSSL:

which openssl
/usr/local/openssl/bin/openssl
ntaf@ntaf:~$ openssl version
OpenSSL 1.1.0d  26 Jan 2017



and a Titan compiled from the latest source code available in github:

compiler -v
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Product number: CRL 113 200/6 R1A
Build date: Feb 14 2017 06:18:59
Compiled with: GCC 5.4.0
Using OpenSSL 1.1.0d  26 Jan 2017



Relevant sections of the config file:


[MODULE_PARAMETERS]

HTTP_Test.tsp_HostName:="www.eclipse.org";
HTTP_Test.tsp_HttpPort    := 443;
HTTP_Test.tsp_ssl := true; 

[TESTPORT_PARAMETERS]
system.HTTP_PCO.use_notification_ASPs = "yes"
system.HTTP_PCO.http_debugging := "no"
[MAIN_CONTROLLER]
KillTimer:= 1.0;

[EXECUTE]
HTTP_Test.control

and Makefile:


OPENSSL_DIR = /usr/local/openssl

:
# Flags for the C++ preprocessor (and makedepend as well):
CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include -I$(OPENSSL_DIR)/include -DAS_USE_SSL
:
LINUX_LIBS = -lxml2 -lssl




The TTCN-3 code used:

module HTTP_Test {


modulepar {

  charstring  tsp_HostName:="www.eclipse.org";
  integer     tsp_HttpPort    := 443;
  boolean     tsp_ssl := false; 
 
}


import from HTTPmsg_Types all;
import from HTTPmsg_PortType all;

type component HTTP_CT {
 port HTTPmsg_PT        HTTP_PCO;
};


template Connect t_Connect := { hostname := tsp_HostName,
  portnumber := tsp_HttpPort, use_ssl := true };


template Close t_Close (template integer p_clientId) := {client_id:=p_clientId};
template Half_close t_Half_close(template integer p_clientId):={client_id:=p_clientId};

//------------------------------------------------------------------------------
function ContentLength (in charstring par_body)  return charstring
//------------------------------------------------------------------------------

{
  var charstring a:=int2str(lengthof (par_body))
  return a;

}


template  HTTPMessage t_request_000(in integer p_clientid):={ request := { client_id :=p_clientid, method := "HEAD", uri := "/", version_major := 1, version_minor := 0, header := {}, body := "" } } 


//******************************************************
testcase tc_000() runs on HTTP_CT{
//******************************************************


  //---------------------HTTP---------------------------
  var Connect_result v_Connect_result
  var charstring vl_char_body
  var octetstring v_body
  var HTTPMessage  v_HTTPMessage 
  var integer v_http_client_id
  timer t0:=1.0;


  map(self:HTTP_PCO, system:HTTP_PCO);

  var Connect vl_connect:={ hostname := tsp_HostName, portnumber := tsp_HttpPort, use_ssl := tsp_ssl } //!!!

  HTTP_PCO.send(vl_connect) 
  alt 
  {

    []HTTP_PCO.receive(Connect_result:?) -> value v_Connect_result { v_http_client_id:=v_Connect_result.client_id}

  }


  HTTP_PCO.send(t_request_000(v_http_client_id)) 
  alt 
  {

    []HTTP_PCO.receive(HTTPMessage:?)  -> value v_HTTPMessage
    {

      if (ischosen(v_HTTPMessage.response_binary))
      {
        v_body:=v_HTTPMessage.response_binary.body;//binary here means non-ascii:UTF-8 or UTF-16
        log("v_body",v_body);
        log("encodingtype",get_stringencoding(v_body ));

      } else  if (ischosen(v_HTTPMessage.response))

      {
        vl_char_body:=v_HTTPMessage.response.body
        log("vl_char_body",vl_char_body);

      }
    }
}

  HTTP_PCO.send(t_Close(v_http_client_id)) 
  t0.start;
  alt 
  {
    []HTTP_PCO.receive {}
    []t0.timeout {}
  }


}//end tc

control {

 execute(tc_000());
}

}

The nature of the connection is determined by the use_ssl field in the Connect message.

For use_ssl false, we see the server complaining about our plain HTTP:

04:55:39.097283 - TTCN-3 Main Test Component started on ntaf. Version: CRL 113 200/6 R1A.
04:55:39.097384 - TTCN Logger v2.2 options: TimeStampFormat:=Time; LogEntityName:=No; LogEventTypes:=No; SourceInfoFormat:=Single; *.FileMask:=LOG_ALL | MATCHING | DEBUG; *.ConsoleMask:=ERROR | USER; LogFileSize:=0; LogFileNumber:=1; DiskFullAction:=Error
04:55:39.097649 - Connected to MC.
04:55:39.099516 - Executing control part of module HTTP_Test.
04:55:39.099698 HTTP_Test.ttcn:112 Execution of control part in module HTTP_Test started.
04:55:39.099800 HTTP_Test.ttcn:45 Test case tc_000 started.
04:55:39.099830 HTTP_Test.ttcn:45 Initializing variables, timers and ports of component type HTTP_Test.HTTP_CT inside testcase tc_000.
04:55:39.099857 HTTP_Test.ttcn:45 Port HTTP_PCO was started.
04:55:39.099881 HTTP_Test.ttcn:45 Component type HTTP_Test.HTTP_CT was initialized.
04:55:39.099899 HTTP_Test.ttcn:60 Mapping port mtc:HTTP_PCO to system:HTTP_PCO.
04:55:39.099984 HTTP_Test.ttcn:60 Abstract socket: warning: HTTP_PCO: to switch on HTTP test port debugging, set the '*.HTTP_PCO.http_debugging := "yes" in the port's parameters.
04:55:39.100021 HTTP_Test.ttcn:60 Port HTTP_PCO was mapped to system:HTTP_PCO.
04:55:39.100084 HTTP_Test.ttcn:60 Map operation of mtc:HTTP_PCO to system:HTTP_PCO finished.
04:55:39.100128 HTTP_Test.ttcn:64 Sent on HTTP_PCO to system @HTTPmsg_Types.Connect : {
    hostname := "www.eclipse.org",
    portnumber := 443,
    use_ssl := false
}
04:55:39.274725 HTTP_Test.ttcn:64 Message enqueued on HTTP_PCO from system @HTTPmsg_Types.Connect_result : {
    client_id := 6
} id 1
04:55:39.274927 HTTP_Test.ttcn:68 Matching on port HTTP_PCO succeeded:  matched
04:55:39.275031 HTTP_Test.ttcn:68 Receive operation on port HTTP_PCO succeeded, message from system(): @HTTPmsg_Types.Connect_result : {
    client_id := 6
} id 1
04:55:39.275082 HTTP_Test.ttcn:68 Message with id 1 was extracted from the queue of HTTP_PCO.
04:55:39.275236 HTTP_Test.ttcn:73 Sent on HTTP_PCO to system @HTTPmsg_Types.HTTPMessage : {
    request := {
        client_id := 6,
        method := "HEAD",
        uri := "/",
        version_major := 1,
        version_minor := 0,
        header := { },
        body := ""
    }
}
04:55:39.408652 HTTP_Test.ttcn:74 starting f_HTTP_decodeCommon 
04:55:39.412027 HTTP_Test.ttcn:74 DECODER: <<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href="https://www.eclipse.org/"><b>https://www.eclipse.org/</b></a></blockquote></p>
</body></html>
>

04:55:39.412095 HTTP_Test.ttcn:74 Warning: Missing '\r'.
04:55:39.412137 HTTP_Test.ttcn:74 method_name: <<!DOCTYPE>
04:55:39.412171 HTTP_Test.ttcn:74 HTTPmsg__PT::HTTP_decode, before calling incoming_message
04:55:39.412238 HTTP_Test.ttcn:74 Message enqueued on HTTP_PCO from system @HTTPmsg_Types.HTTPMessage : {
    erronous_msg := {
        client_id := omit,
        msg := "<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href=\"https://www.eclipse.org/\"><b>https://www.eclipse.org/</b></a></blockquote></p>
</body></html>
"
    }
} id 2
04:55:39.412277 HTTP_Test.ttcn:74 HTTPmsg__PT::HTTP_decode, after calling incoming_message
04:55:39.412305 HTTP_Test.ttcn:77 Matching on port HTTP_PCO succeeded:  matched
04:55:39.412369 HTTP_Test.ttcn:77 Receive operation on port HTTP_PCO succeeded, message from system(): @HTTPmsg_Types.HTTPMessage : {
    erronous_msg := {
        client_id := omit,
        msg := "<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href=\"https://www.eclipse.org/\"><b>https://www.eclipse.org/</b></a></blockquote></p>
</body></html>
"
    }
} id 2
04:55:39.412416 HTTP_Test.ttcn:77 Message with id 2 was extracted from the queue of HTTP_PCO.
04:55:39.412447 HTTP_Test.ttcn:97 Sent on HTTP_PCO to system @HTTPmsg_Types.Close : {
    client_id := 6
}
04:55:39.412635 HTTP_Test.ttcn:98 Start timer t0: 1 s
04:55:40.413806 HTTP_Test.ttcn:102 Timeout t0: 1 s
04:55:40.413993 HTTP_Test.ttcn:102 Terminating component type HTTP_Test.HTTP_CT.
04:55:40.414048 HTTP_Test.ttcn:102 Removing unterminated mapping between port HTTP_PCO and system:HTTP_PCO.
04:55:40.414103 HTTP_Test.ttcn:102 Port HTTP_PCO was unmapped from system:HTTP_PCO.
04:55:40.414239 HTTP_Test.ttcn:102 Port HTTP_PCO was stopped.
04:55:40.414294 HTTP_Test.ttcn:102 Component type HTTP_Test.HTTP_CT was shut down inside testcase tc_000.
04:55:40.414336 HTTP_Test.ttcn:102 Waiting for PTCs to finish.
04:55:40.414569 HTTP_Test.ttcn:102 Setting final verdict of the test case.
04:55:40.414694 HTTP_Test.ttcn:102 Local verdict of MTC: none
04:55:40.414735 HTTP_Test.ttcn:102 No PTCs were created.
04:55:40.414773 HTTP_Test.ttcn:102 Test case tc_000 finished. Verdict: none
04:55:40.414818 HTTP_Test.ttcn:114 Execution of control part in module HTTP_Test finished.
04:55:40.416264 - Verdict statistics: 1 none (100.00 %), 0 pass (0.00 %), 0 inconc (0.00 %), 0 fail (0.00 %), 0 error (0.00 %).
04:55:40.416392 - Test execution summary: 1 test case was executed. Overall verdict: none
04:55:40.416434 - Exit was requested from MC. Terminating MTC.




For use_ssl true, the server returns the usual babble:

04:49:58.761503 - TTCN-3 Main Test Component started on ntaf. Version: CRL 113 200/6 R1A.
04:49:58.761576 - TTCN Logger v2.2 options: TimeStampFormat:=Time; LogEntityName:=No; LogEventTypes:=No; SourceInfoFormat:=Single; *.FileMask:=LOG_ALL | MATCHING | DEBUG; *.ConsoleMask:=ERROR | USER; LogFileSize:=0; LogFileNumber:=1; DiskFullAction:=Error
04:49:58.761807 - Connected to MC.
04:49:58.762491 - Executing control part of module HTTP_Test.
04:49:58.762561 HTTP_Test.ttcn:112 Execution of control part in module HTTP_Test started.
04:49:58.762636 HTTP_Test.ttcn:45 Test case tc_000 started.
04:49:58.762661 HTTP_Test.ttcn:45 Initializing variables, timers and ports of component type HTTP_Test.HTTP_CT inside testcase tc_000.
04:49:58.762751 HTTP_Test.ttcn:45 Port HTTP_PCO was started.
04:49:58.762794 HTTP_Test.ttcn:45 Component type HTTP_Test.HTTP_CT was initialized.
04:49:58.762830 HTTP_Test.ttcn:60 Mapping port mtc:HTTP_PCO to system:HTTP_PCO.
04:49:58.762980 HTTP_Test.ttcn:60 Abstract socket: warning: HTTP_PCO: to switch on HTTP test port debugging, set the '*.HTTP_PCO.http_debugging := "yes" in the port's parameters.
04:49:58.763022 HTTP_Test.ttcn:60 Port HTTP_PCO was mapped to system:HTTP_PCO.
04:49:58.763095 HTTP_Test.ttcn:60 Map operation of mtc:HTTP_PCO to system:HTTP_PCO finished.
04:49:58.763136 HTTP_Test.ttcn:64 Sent on HTTP_PCO to system @HTTPmsg_Types.Connect : {
    hostname := "www.eclipse.org",
    portnumber := 443,
    use_ssl := true
}
04:49:59.220539 HTTP_Test.ttcn:64 Message enqueued on HTTP_PCO from system @HTTPmsg_Types.Connect_result : {
    client_id := 6
} id 1
04:49:59.220793 HTTP_Test.ttcn:68 Matching on port HTTP_PCO succeeded:  matched
04:49:59.220883 HTTP_Test.ttcn:68 Receive operation on port HTTP_PCO succeeded, message from system(): @HTTPmsg_Types.Connect_result : {
    client_id := 6
} id 1
04:49:59.220933 HTTP_Test.ttcn:68 Message with id 1 was extracted from the queue of HTTP_PCO.
04:49:59.221051 HTTP_Test.ttcn:73 Sent on HTTP_PCO to system @HTTPmsg_Types.HTTPMessage : {
    request := {
        client_id := 6,
        method := "HEAD",
        uri := "/",
        version_major := 1,
        version_minor := 0,
        header := { },
        body := ""
    }
}
04:49:59.445347 HTTP_Test.ttcn:74 starting f_HTTP_decodeCommon 
04:49:59.445498 HTTP_Test.ttcn:74 DECODER: <HTTP/1.1 200 OK
Date: Mon, 20 Feb 2017 12:50:01 GMT
Server: Apache
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Mon, 20 Feb 2017 12:50:01 GMT
cache-Control: no-store, no-cache, must-revalidate
cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=fo8ugpac4qp8qmjnujdkkp272h0rg4rs; path=/; HttpOnly
X-NodeID: www-vm5
X-Frame-Options: SAMEORIGIN
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=utf-8

>

04:49:59.445549 HTTP_Test.ttcn:74 method_name: <HTTP/1.1>
04:49:59.445602 HTTP_Test.ttcn:74 Decoding the headers
04:49:59.445755 HTTP_Test.ttcn:74 Headers decoded. Valid headers.
04:49:59.445957 HTTP_Test.ttcn:74 starting f_HTTP_decodeCommon 
04:49:59.446012 HTTP_Test.ttcn:74 DECODER: <HTTP/1.1 200 OK
Date: Mon, 20 Feb 2017 12:50:01 GMT
Server: Apache
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Mon, 20 Feb 2017 12:50:01 GMT
cache-Control: no-store, no-cache, must-revalidate
cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=fo8ugpac4qp8qmjnujdkkp272h0rg4rs; path=/; HttpOnly
X-NodeID: www-vm5
X-Frame-Options: SAMEORIGIN
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=utf-8

>

04:49:59.446052 HTTP_Test.ttcn:74 method_name: <HTTP/1.1>
04:49:59.446093 HTTP_Test.ttcn:74 Decoding the headers
04:49:59.446172 HTTP_Test.ttcn:74 Headers decoded. Valid headers.
04:49:59.446208 HTTP_Test.ttcn:74 Message successfully decoded
04:49:59.446250 HTTP_Test.ttcn:74 HTTPmsg__PT::HTTP_decode, before calling incoming_message
04:49:59.446382 HTTP_Test.ttcn:74 Message enqueued on HTTP_PCO from system @HTTPmsg_Types.HTTPMessage : {
    response := {
        client_id := 6,
        version_major := 1,
        version_minor := 1,
        statuscode := 200,
        statustext := "OK",
        header := {
            {
                header_name := "Date",
                header_value := "Mon, 20 Feb 2017 12:50:01 GMT"
            },
            {
                header_name := "Server",
                header_value := "Apache"
            },
            {
                header_name := "Expires",
                header_value := "Mon, 26 Jul 1997 05:00:00 GMT"
            },
            {
                header_name := "Last-Modified",
                header_value := "Mon, 20 Feb 2017 12:50:01 GMT"
            },
            {
                header_name := "cache-Control",
                header_value := "no-store, no-cache, must-revalidate"
            },
            {
                header_name := "cache-Control",
                header_value := "post-check=0, pre-check=0"
            },
            {
                header_name := "Pragma",
                header_value := "no-cache"
            },
            {
                header_name := "Set-Cookie",
                header_value := "PHPSESSID=fo8ugpac4qp8qmjnujdkkp272h0rg4rs; path=/; HttpOnly"
            },
            {
                header_name := "X-NodeID",
                header_value := "www-vm5"
            },
            {
                header_name := "X-Frame-Options",
                header_value := "SAMEORIGIN"
            },
            {
                header_name := "Vary",
                header_value := "Accept-Encoding"
            },
            {
                header_name := "Connection",
                header_value := "close"
            },
            {
                header_name := "Content-Type",
                header_value := "text/html; charset=utf-8"
            }
        },
        body := ""
    }
} id 2
04:49:59.446496 HTTP_Test.ttcn:74 HTTPmsg__PT::HTTP_decode, after calling incoming_message
04:49:59.446544 HTTP_Test.ttcn:74 Message enqueued on HTTP_PCO from system @HTTPmsg_Types.Half_close : {
    client_id := 6
} id 3
04:49:59.446598 HTTP_Test.ttcn:77 Matching on port HTTP_PCO succeeded:  matched
04:49:59.446765 HTTP_Test.ttcn:77 Receive operation on port HTTP_PCO succeeded, message from system(): @HTTPmsg_Types.HTTPMessage : {
    response := {
        client_id := 6,
        version_major := 1,
        version_minor := 1,
        statuscode := 200,
        statustext := "OK",
        header := {
            {
                header_name := "Date",
                header_value := "Mon, 20 Feb 2017 12:50:01 GMT"
            },
            {
                header_name := "Server",
                header_value := "Apache"
            },
            {
                header_name := "Expires",
                header_value := "Mon, 26 Jul 1997 05:00:00 GMT"
            },
            {
                header_name := "Last-Modified",
                header_value := "Mon, 20 Feb 2017 12:50:01 GMT"
            },
            {
                header_name := "cache-Control",
                header_value := "no-store, no-cache, must-revalidate"
            },
            {
                header_name := "cache-Control",
                header_value := "post-check=0, pre-check=0"
            },
            {
                header_name := "Pragma",
                header_value := "no-cache"
            },
            {
                header_name := "Set-Cookie",
                header_value := "PHPSESSID=fo8ugpac4qp8qmjnujdkkp272h0rg4rs; path=/; HttpOnly"
            },
            {
                header_name := "X-NodeID",
                header_value := "www-vm5"
            },
            {
                header_name := "X-Frame-Options",
                header_value := "SAMEORIGIN"
            },
            {
                header_name := "Vary",
                header_value := "Accept-Encoding"
            },
            {
                header_name := "Connection",
                header_value := "close"
            },
            {
                header_name := "Content-Type",
                header_value := "text/html; charset=utf-8"
            }
        },
        body := ""
    }
} id 2
04:49:59.446856 HTTP_Test.ttcn:77 Message with id 2 was extracted from the queue of HTTP_PCO.
04:49:59.446900 HTTP_Test.ttcn:90 vl_char_body""
04:49:59.447546 HTTP_Test.ttcn:97 Sent on HTTP_PCO to system @HTTPmsg_Types.Close : {
    client_id := 6
}
04:49:59.448075 HTTP_Test.ttcn:98 Start timer t0: 1 s
04:49:59.448469 HTTP_Test.ttcn:101 Matching on port HTTP_PCO succeeded.
04:49:59.448534 HTTP_Test.ttcn:101 Receive operation on port HTTP_PCO succeeded, message from system(): @HTTPmsg_Types.Half_close: {
    client_id := 6
} id 3
04:49:59.448587 HTTP_Test.ttcn:101 Message with id 3 was extracted from the queue of HTTP_PCO.
04:49:59.448792 HTTP_Test.ttcn:101 Terminating component type HTTP_Test.HTTP_CT.
04:49:59.448855 HTTP_Test.ttcn:101 Removing unterminated mapping between port HTTP_PCO and system:HTTP_PCO.
04:49:59.448902 HTTP_Test.ttcn:101 Port HTTP_PCO was unmapped from system:HTTP_PCO.
04:49:59.449089 HTTP_Test.ttcn:101 Port HTTP_PCO was stopped.
04:49:59.449154 HTTP_Test.ttcn:101 Component type HTTP_Test.HTTP_CT was shut down inside testcase tc_000.
04:49:59.449199 HTTP_Test.ttcn:101 Waiting for PTCs to finish.
04:49:59.449369 HTTP_Test.ttcn:101 Setting final verdict of the test case.
04:49:59.449432 HTTP_Test.ttcn:101 Local verdict of MTC: none
04:49:59.449474 HTTP_Test.ttcn:101 No PTCs were created.
04:49:59.449511 HTTP_Test.ttcn:101 Test case tc_000 finished. Verdict: none
04:49:59.449557 HTTP_Test.ttcn:114 Execution of control part in module HTTP_Test finished.
04:49:59.451013 - Verdict statistics: 1 none (100.00 %), 0 pass (0.00 %), 0 inconc (0.00 %), 0 fail (0.00 %), 0 error (0.00 %).
04:49:59.451113 - Test execution summary: 1 test case was executed. Overall verdict: none
04:49:59.451174 - Exit was requested from MC. Terminating MTC.


Important note 1:

-when sending a non-zero length body in the HTTP message, the content-length header has to be present and set correctly.
//------------------------------------------------------------------------------
function f_ContentLength (in charstring par_body)  return charstring
//------------------------------------------------------------------------------

{
  var charstring a:=int2str(lengthof (par_body))
  return a;
}

v_body:=="abcdefg"
...header := { ...{ header_name := "Content-Length", header_value :=  f_ContentLength(v_body) }... }...



Important note 2:

Compared with the "TLS/TCP with IPL4" example, a significant difference here is that we express the HTTP messages in a structured form,
not in a lame pre-encoded form. Obviously , the more complex the messages , the more difficult it becomes to encode them "on paper", not to mention decoding.
Using structures also enables the powerful template matching mechanism of TTCN-3.
(Note that the HTTP message is received as a structure, with decoded headers etc.
while in the referred example it was received as a piece of binary, as in this:


@HTTPmsg_Types.HTTPMessage : {
    response := {
        client_id := 6,
        version_major := 1,
        version_minor := 1,
        statuscode := 200,
        statustext := "OK",
        header := {
            {
                header_name := "Date",
                header_value := "Mon, 20 Feb 2017 12:50:01 GMT"
            },
            {
                header_name := "Server",
                header_value := "Apache"
            },
            {
                header_name := "Expires",
                header_value := "Mon, 26 Jul 1997 05:00:00 GMT"
            },
:
:
            {
                header_name := "Content-Type",
                header_value := "text/html; charset=utf-8"
            }
        },
        body := ""
    }
}


versus this:


msg := '485454502F312E3120323030204F4B0D0A446174653A205475652C2031342046656220323031372030393A31313A303820474D540D0A53657
27665723A204170616368650D0A457870697265733A204D6F6E2C203236204A756C20313939372030353A30303A303020474D540D0A4C6173742D4D6F646
9666965643A205475652C2031342046656220323031372030393A31313A303820474D540D0A63616368652D436F6E74726F6C3A206E6F2D73746F72652C20
6E6F2D63616368652C206D7573742D726576616C69646174650D0A63616368652D436F6E74726F6C3A20706F73742D636865636B3D302C207072652D6368656
36B3D300D0A507261676D613A206E6F2D63616368650D0A5365742D436F6F6B69653A205048505345535349443D39686A316D363831666B7470676C62763
26538706571756174723369307262713B20706174683D2F3B20487474704F6E6C790D0A582D4E6F646549443A207777772D766D350D0A582D4672616D652
D4F7074696F6E733A2053414D454F524947494E0D0A566172793A204163636570742D456E636F64696E670D0A436F6E6E656374696F6E3A20636C6F73650D0A4
36F6E74656E742D547970653A20746578742F68746D6C3B20636861727365743D7574662D380D0A0D0A'O 



Can you spot the difference?

)




The code archive and the detailed log is attached.

Best regards
Elemer
Re: Using TLS/DTLS with Titan test ports part 4 [message #1755291 is a reply to message #1755290] Thu, 02 March 2017 08:04 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
And the attachments:
Previous Topic:Eclipse Titan 6.1.pl0 release notification
Next Topic:TTCN-3 decoding hypothesis
Goto Forum:
  


Current Time: Wed Apr 24 22:55:13 GMT 2024

Powered by FUDForum. Page generated in 0.02877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top