From d0642d25113f62178b0cb6ac3081a1e28b8b7988 Mon Sep 17 00:00:00 2001 From: Stas Klinov Date: Thu, 12 Dec 2024 13:54:11 +0100 Subject: [PATCH] fixed HTTP query part of the URI parsed wrong; fixed #2840 --- src/searchdhttp.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/searchdhttp.cpp b/src/searchdhttp.cpp index bb9b561c65..8f92dd9fd1 100644 --- a/src/searchdhttp.cpp +++ b/src/searchdhttp.cpp @@ -646,8 +646,9 @@ void HttpRequestParser_c::ParseList ( Str_t sData, OptionsHash_t & hOptions ) { HTTPINFO << "ParseList with " << sData.second << " bytes '" << Data2Log ( sData ) << "'"; - const char * sCur = sData.first; - const char* sLast = sCur; + CSphString sBuf ( sData ); + const char * sCur = sBuf.cstr(); + const char * sLast = sCur; const char * sEnd = sCur + sData.second; Str_t sName = dEmptyStr; @@ -727,7 +728,7 @@ inline void HttpRequestParser_c::FinishParserUrl () if ( ( tUri.field_set & uQuery )!=0 ) { Str_t sRawGetQuery { sData.first + tUri.field_data[UF_QUERY].off, tUri.field_data[UF_QUERY].len }; - if ( m_eType == HTTP_GET ) + if ( m_eType==HTTP_GET ) DecodeAndStoreRawQuery ( m_hOptions, sRawGetQuery ); ParseList ( sRawGetQuery, m_hOptions ); }