From 1a10f84e15a4c0e755e57b32609bc0a4f6ee5d83 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Sun, 12 Mar 2023 14:10:49 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-12337 Signed-off-by: stephb9959 --- build | 2 +- src/RESTAPI/RESTAPI_device_commandHandler.cpp | 1 - src/RESTAPI/RESTAPI_file.cpp | 4 ---- src/framework/RESTAPI_Handler.h | 1 - test_scripts/curl/cli | 4 ++-- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/build b/build index 7c6ba0fe..2ebc6516 100644 --- a/build +++ b/build @@ -1 +1 @@ -55 \ No newline at end of file +56 \ No newline at end of file diff --git a/src/RESTAPI/RESTAPI_device_commandHandler.cpp b/src/RESTAPI/RESTAPI_device_commandHandler.cpp index 6b59cf27..5c6de09b 100644 --- a/src/RESTAPI/RESTAPI_device_commandHandler.cpp +++ b/src/RESTAPI/RESTAPI_device_commandHandler.cpp @@ -614,7 +614,6 @@ namespace OpenWifi { std::stringstream ParamStream; Params.stringify(ParamStream); Cmd.Details = ParamStream.str(); - std::cout << "type='" << SCR.type << "'" << std::endl; FileUploader()->AddUUID(CMD_UUID, 15min, SCR.type == "shell" ? "txt" : "gzip" ); return RESTAPI_RPC::WaitForCommand(CMD_RPC, APCommands::Commands::script, false, Cmd, diff --git a/src/RESTAPI/RESTAPI_file.cpp b/src/RESTAPI/RESTAPI_file.cpp index c56b1183..7924af5d 100644 --- a/src/RESTAPI/RESTAPI_file.cpp +++ b/src/RESTAPI/RESTAPI_file.cpp @@ -26,19 +26,15 @@ namespace OpenWifi { return NotFound(); } if (FileType == "pcap") { - std::cout << __LINE__ << std::endl; SendFileContent(FileContent, "application/vnd.tcpdump.pcap", UUID + ".pcap"); } else if (FileType == "gzip") { - std::cout << __LINE__ << std::endl; SendFileContent(FileContent, "application/gzip", UUID + ".tar.gz"); } else if (FileType == "txt") { - std::cout << __LINE__ << std::endl; SendFileContent(FileContent, "txt/plain", UUID + ".txt"); } else { - std::cout << __LINE__ << std::endl; SendFileContent(FileContent, "application/octet-stream", UUID + ".bin"); } } diff --git a/src/framework/RESTAPI_Handler.h b/src/framework/RESTAPI_Handler.h index f994e770..da5d48f0 100644 --- a/src/framework/RESTAPI_Handler.h +++ b/src/framework/RESTAPI_Handler.h @@ -497,7 +497,6 @@ namespace OpenWifi { SetCommonHeaders(); auto MT = Utils::FindMediaType(Name); if (MT.Encoding == Utils::BINARY) { - std::cout << __LINE__ << std::endl; Response->set("Content-Transfer-Encoding", "binary"); Response->set("Accept-Ranges", "bytes"); } diff --git a/test_scripts/curl/cli b/test_scripts/curl/cli index d2ebf59f..674097a3 100755 --- a/test_scripts/curl/cli +++ b/test_scripts/curl/cli @@ -533,9 +533,9 @@ devicecount() { getfile() { curl ${FLAGS} -X GET "https://${OWGW}/api/v1/file/$2?serialNumber=$1" \ - -H "accept: application/octet-stream" \ + -H "accept: */*" \ -H "Authorization: Bearer ${token}" \ - -o "$2.pcap" + -O -J } rtty() {