Skip to content

Commit

Permalink
fixed HTTP query part of the URI parsed wrong; fixed #2840
Browse files Browse the repository at this point in the history
  • Loading branch information
tomatolog committed Dec 12, 2024
1 parent d4029e1 commit 15a08f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/searchdhttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 );
}
Expand Down

0 comments on commit 15a08f1

Please sign in to comment.