it = ::http_request_header.begin();
end = ::http_request_header.end();
http_request request(std::string(client_msg, client_length));
+
+ // Ignore when client_msg is not HTTP message
+ if (request.method().empty())
+ goto packet_edit_out;
+
for (;it != end; ++it) {
// Set request header field
if (it->first == "set") {
* Insert other protocol editor.
*/
+packet_edit_out:
+
if (request.modified()) {
std::string edited = request.as_string();
// New client message is too long (over buffer size)
it = ::http_response_header.begin();
end = ::http_response_header.end();
http_response response(std::string(server_msg, server_length));
+
+ // Ignore when server_msg is not HTTP message
+ if (response.http_version().empty())
+ goto packet_edit_out;
+
for (;it != end; ++it) {
// Set request header field
if (it->first == "set") {
* Insert other protocol editor.
*/
+packet_edit_out:
+
if (response.modified()) {
std::string edited = response.as_string();
// New server message is too long (over buffer size)