Skip to content

VDB-5982/LOGMON-239 accept empty string for HTTP request method #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: engineering
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion parser/aws/AWS_Interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "ReceiverInterface.hpp"
#include "ParserInterface.hpp"

#include <memory>
#include <string>

namespace NCBI
{
Expand Down
2 changes: 1 addition & 1 deletion parser/gcp/GCP_Interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "ReceiverInterface.hpp"
#include "ParserInterface.hpp"

#include <memory>
#include <string>

namespace NCBI
{
Expand Down
1 change: 1 addition & 0 deletions parser/gcp/gcp_parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ ip_region

method
: QUOTE QSTR QUOTE { $$ = $2; lib->set( GCPReceiver::method, $2 ); }
| QUOTE QUOTE { $$ = $2; lib->set( GCPReceiver::method, EmptyTSTR ); }
;

status
Expand Down
7 changes: 7 additions & 0 deletions parser/gcp/gcp_test_parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ TEST_F( GCPTestFixture, LOGMON_208 )
static_cast<const GCPReceiver&>( pb -> GetReceiver() ) . agent_for_postprocess );
}

TEST_F( GCPTestFixture, LOGMON_239_EmptyMethod )
{
string res = try_to_parse_good("\"1745735054441785\",\"\",\"\",\"\",\"\",\"\",\"200\",\"\",\"\",\"\",\"\",\"\",\"GCS Lifecycle Management\",\"0fb4c5bb9c78965f21f0b24f3f3b956e\",\"\",\"sra-ca-run-103\",\"\"");
ASSERT_NE( "", res );
ASSERT_EQ( "", extract_value( res, "method" ) );
}

extern "C"
{
int main ( int argc, const char * argv [], const char * envp [] )
Expand Down
2 changes: 1 addition & 1 deletion parser/op/OP_Interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "ReceiverInterface.hpp"
#include "ParserInterface.hpp"

#include <memory>
#include <string>

namespace NCBI
{
Expand Down