Improvements

IIS user-agent handling
This commit is contained in:
Valentino Orlandi 2022-08-02 21:02:26 +02:00
parent 4c323e0cdc
commit ee132b0c82
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
1 changed files with 9 additions and 2 deletions

View File

@ -279,8 +279,15 @@ bool StoreOps::storeData( QSqlDatabase& db, Craplog& craplog, const std::vector<
query_stmt += "NULL";
} else {
// value found, bind it
perf_size += row.at( i ).size();
query_stmt += QString("'%1'").arg( QString::fromStdString( row.at( i ) ).replace("'","''") );
if ( i == 21 && wsID == 13 ) {
// iis logs the user-agent using '+' instead of ' ' (spaces)
QString str = QString::fromStdString( row.at( i ) ).replace("+"," ");
perf_size += str.size();
query_stmt += QString("'%1'").arg( str.replace("'","''") );
} else {
perf_size += row.at( i ).size();
query_stmt += QString("'%1'").arg( QString::fromStdString( row.at( i ) ).replace("'","''") );
}
}
}