]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
file_data output and some FIXIT comments
authorTom Peters <thopeter@cisco.com>
Fri, 5 Dec 2014 17:03:22 +0000 (12:03 -0500)
committerTom Peters <thopeter@cisco.com>
Fri, 5 Dec 2014 17:03:22 +0000 (12:03 -0500)
src/service_inspectors/nhttp_inspect/nhttp_msg_header.cc
src/service_inspectors/nhttp_inspect/nhttp_msg_section.cc
src/service_inspectors/nhttp_inspect/nhttp_splitter.cc

index 541bad177c5e82728fbf79385ef6b609c0a49dd7..eb937e32f11e1eba2c1d02376657f63ec2f49d87 100644 (file)
@@ -77,6 +77,7 @@ void NHttpMsgHeader::update_flow() {
         session_data->half_reset(SRC_SERVER);
     }
     // If there is a Transfer-Encoding header, see if the last of the encoded values is "chunked".
+    // FIXIT-L do something with Transfer-Encoding header with chunked present but not last.
     else if ((get_header_value_norm(HEAD_TRANSFER_ENCODING).length > 0)                     &&
              ((*(int64_t *)(get_header_value_norm(HEAD_TRANSFER_ENCODING).start + 
              (get_header_value_norm(HEAD_TRANSFER_ENCODING).length - 8))) == TRANSCODE_CHUNKED) ) {
index d1c464c1b22f6c9ec4cece61ebaec9a49d422bbc..0596f3c4b318bf295e22e109e532ff71f1403fdd 100644 (file)
@@ -61,6 +61,9 @@ void NHttpMsgSection::print_message_wrapup(FILE *output) const {
     for (int i=0; i < HTTP_BUFFER_MAX; i++) {
         if ((1 << i) & http_mask) Field(http_buffer[i].length, http_buffer[i].buf).print(output, http_buffer_name[i]);
     }
+    if (g_file_data.len > 0) {
+        Field(g_file_data.len, g_file_data.data).print(output, "file_data");
+    }
     fprintf(output, "\n");
     session_data->show(output);
     fprintf(output, "\n");
@@ -126,9 +129,3 @@ void NHttpMsgSection::legacy_cookie(NHttpMsgHeadShared* header, SourceId source_
     }
 }
 
-
-
-
-
-
-
index 553f5a80366ba7636b6b7bcc7d7cfdd4793e8c42..6b87265eeaf3891661d4a10847582a2a8628f8ca 100644 (file)
@@ -144,6 +144,7 @@ ScanResult NHttpChunkSplitter::split(const uint8_t* buffer, uint32_t length) {
         return SCAN_FOUND;
     }
     for (uint32_t k = 0; k < length; k++) {
+    // FIXIT-M learn to support white space before chunk header extension semicolon
         if (buffer[k] == '\n') {
             if (octets_seen + k == num_crlf) {
                 // \r\n or \n leftover from previous chunk