diff --git a/HTTPmsg_CNL113312.tpd b/HTTPmsg_CNL113312.tpd index b8043a7c59b9d39915b3231c4d0216378ab870be..79575ba84583c64095b4679f5bce896d97087cd1 100644 --- a/HTTPmsg_CNL113312.tpd +++ b/HTTPmsg_CNL113312.tpd @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2014 Ericsson + Copyright (c) 2015 Ericsson All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 @@ -10,10 +10,8 @@ File: HTTPmsg_CNL113312.tpd Description: tpd project file - Rev: R8D + Rev: R8F Prodnr: CNL 113 312 - Updated: 2014-09-03 - Contact: http://ttcn.ericsson.se --> <TITAN_Project_File_Information version="1.0"> diff --git a/demo/lssl_script b/demo/lssl_script old mode 100644 new mode 100755 diff --git a/doc/15517-CNL113312_EN_E_PDFV1R2.pdf b/doc/FS_15517_CNL113_312_RevE.pdf similarity index 99% rename from doc/15517-CNL113312_EN_E_PDFV1R2.pdf rename to doc/FS_15517_CNL113_312_RevE.pdf index dcc542c739156b7d93b9298648e08e4fcce2e308..50c898ceed16d956e950fe65a6f3a866b832035c 100644 Binary files a/doc/15517-CNL113312_EN_E_PDFV1R2.pdf and b/doc/FS_15517_CNL113_312_RevE.pdf differ diff --git a/doc/HTTPmsg_CNL113312_PRI.doc b/doc/HTTPmsg_CNL113312_PRI.doc new file mode 100644 index 0000000000000000000000000000000000000000..16481237d78e4d93c181db8e03e425a9ebb060a3 Binary files /dev/null and b/doc/HTTPmsg_CNL113312_PRI.doc differ diff --git a/doc/19817-CNL113312_EN_G_PDFV1R2.pdf b/doc/UG_19817_CNL113_312_RevG.pdf similarity index 99% rename from doc/19817-CNL113312_EN_G_PDFV1R2.pdf rename to doc/UG_19817_CNL113_312_RevG.pdf index b82b0e7696caed67114adbeb7373a7446fa081cc..546a7e8cc439a5e58271f51895d06dd4235429e5 100644 Binary files a/doc/19817-CNL113312_EN_G_PDFV1R2.pdf and b/doc/UG_19817_CNL113_312_RevG.pdf differ diff --git a/src/HTTPmsg_MessageLen.ttcn b/src/HTTPmsg_MessageLen.ttcn index 99453a847b720c007b2c41c301becdbdce46e478..845ea225e50239bae3f925f54dbd31777d935de6 100644 --- a/src/HTTPmsg_MessageLen.ttcn +++ b/src/HTTPmsg_MessageLen.ttcn @@ -16,7 +16,7 @@ // // File: HTTPmsg_MessageLen.ttcn // Description: HTTP Message length calculator -// Rev: R8D +// Rev: R8F // Prodnr: CNL 113 469 module HTTPmsg_MessageLen{ diff --git a/src/HTTPmsg_MessageLen_Function.cc b/src/HTTPmsg_MessageLen_Function.cc index fd6c7fd5b188ce2938fda8e0ff785b3ed7b03903..07d1c54f535ca122e53d96306c4cf60b8e1406d6 100644 --- a/src/HTTPmsg_MessageLen_Function.cc +++ b/src/HTTPmsg_MessageLen_Function.cc @@ -15,7 +15,7 @@ // // File: HTTPmsg_MessageLen_Function.cc // Description: HTTP Message length calculator -// Rev: R8D +// Rev: R8F // Prodnr: CNL 113 469 #include "HTTPmsg_PT.hh" diff --git a/src/HTTPmsg_PT.cc b/src/HTTPmsg_PT.cc index 71de2911ce4b05a63ff1c3cff3c7f454aa5a8c58..411ade48f514533cab19aceb3be92e6049385add 100644 --- a/src/HTTPmsg_PT.cc +++ b/src/HTTPmsg_PT.cc @@ -15,7 +15,7 @@ // // File: HTTPmsg_PT.cc // Description: HTTP test port implementation -// Rev: R8D +// Rev: R8F // Prodnr: CNL 113 469 @@ -459,6 +459,22 @@ int HTTPmsg__PT::send_message_on_fd(int client_id, const unsigned char * message return Abstract_Socket::send_message_on_fd(client_id, message_buffer, length_of_message); } +int HTTPmsg__PT::send_message_on_nonblocking_fd(int client_id, const unsigned char * message_buffer, int length_of_message) +{ + log_debug("entering HTTPmsg__PT::(client_id: %d)", client_id); + +#ifdef AS_USE_SSL + if(get_user_data(client_id)) + { + // INFO: it is assumed that only SSL_Socket assigns user data to each peer + log_debug("leaving HTTPmsg__PT::send_message_on_nonblocking_fd() with returning SSL_Socket::send_message_on_nonblocking_fd()"); + return SSL_Socket::send_message_on_nonblocking_fd(client_id, message_buffer, length_of_message); + } +#endif + + log_debug("leaving HTTPmsg__PT::send_message_on_nonblocking_fd() with returning Abstract_Socket::send_message_on_nonblocking_fd()"); + return Abstract_Socket::send_message_on_nonblocking_fd(client_id, message_buffer, length_of_message); +} // HTTP specific functions @@ -1007,9 +1023,9 @@ void HTTP_decode_chunked_body(TTCN_Buffer* buffer, OCTETSTRING& body, Decoding_P HTTPmsg__Types::log_debug(socket_debugging, test_port_type, test_port_name, "pull %d bytes from %d", chunk_size, buffer->get_read_len()); buffer->set_pos(buffer->get_pos() + chunk_size); // hack - if(buffer->get_read_data()[0] == '\n') + if(buffer->get_read_len() && buffer->get_read_data()[0] == '\n') // don't read from the buffer if there is nothing in it. { - TTCN_Logger::log(TTCN_WARNING, "hack: adjusted buffer position after the '\\n'"); + HTTPmsg__Types::log_debug(socket_debugging, test_port_type, test_port_name,"hack: adjusted buffer position after the '\\n'"); buffer->set_pos(buffer->get_pos() + 1); } HTTPmsg__Types::log_debug(socket_debugging, test_port_type, test_port_name, "remaining data: <%s>, len: %d", (const char *)CHARSTRING(buffer->get_read_len(), (const char*)buffer->get_read_data()), buffer->get_read_len()); diff --git a/src/HTTPmsg_PT.hh b/src/HTTPmsg_PT.hh index 3d3f6ebbc0e14f9167f4728c390c3d0615263b7d..46b2eddb355553c8a6ce41712955301c127d2231 100644 --- a/src/HTTPmsg_PT.hh +++ b/src/HTTPmsg_PT.hh @@ -15,7 +15,7 @@ // // File: HTTPmsg_PT.hh // Description: HTTP test port header file -// Rev: R8D +// Rev: R8F // Prodnr: CNL 113 469 @@ -99,6 +99,7 @@ protected: virtual bool add_user_data(int client_id); virtual bool remove_user_data(int client_id); virtual int send_message_on_fd(int client_id, const unsigned char * message_buffer, int length_of_message); + virtual int send_message_on_nonblocking_fd(int client_id, const unsigned char * message_buffer, int length_of_message); virtual int receive_message_on_fd(int client_id); virtual void client_connection_opened(int client_id); virtual void listen_port_opened(int port_number); diff --git a/src/HTTPmsg_PortType.ttcn b/src/HTTPmsg_PortType.ttcn index f56fdde08a77c89b86269cb3850710d9a64fee84..d2745e44afeedd39aad57e660188a425d7222302 100644 --- a/src/HTTPmsg_PortType.ttcn +++ b/src/HTTPmsg_PortType.ttcn @@ -15,7 +15,7 @@ // // File: HTTPmsg_Types.ttcn // Description: HTTP port type definition -// Rev: R8D +// Rev: R8F // Prodnr: CNL 113 469 diff --git a/src/HTTPmsg_Types.ttcn b/src/HTTPmsg_Types.ttcn index c7ef281966d5b0940885ef514a4e27a545fce03d..102fee4ff47adcc45f54f915f8bf9eb0f8c2b16f 100644 --- a/src/HTTPmsg_Types.ttcn +++ b/src/HTTPmsg_Types.ttcn @@ -15,7 +15,7 @@ // // File: HTTPmsg_Types.ttcn // Description: HTTP Message and TCP connection handling ASP types -// Rev: R8D +// Rev: R8F // Prodnr: CNL 113 469