Skip to content

Commit

Permalink
[Backport branch-8-0] reset isreported to MS_FALSE in msResetErrorLis…
Browse files Browse the repository at this point in the history
…t() (#6543) (#6581)

* reset isreported to MS_FALSE in msResetErrorList() (#6543)

* send two queries in a row without arguments to the FastCGI process (#6543)

Co-authored-by: Landry Breuil <landry@rhaalovely.net>
  • Loading branch information
github-actions[bot] and landryb committed Aug 4, 2022
1 parent 32188a2 commit 29eb6fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ echo "Running FastCGI query again"
curl -s "http://localhost/cgi-bin/mapserv.fcgi?MAP=/tmp/wfs_simple.map&SERVICE=WFS&REQUEST=GetCapabilities" > /tmp/res.xml
cat /tmp/res.xml | grep wfs:WFS_Capabilities >/dev/null || (cat /tmp/res.xml && /bin/false)

echo "Check that we return an error if given no arguments"
curl -s "http://localhost/cgi-bin/mapserv.fcgi" > /tmp/res.xml
cat /tmp/res.xml | grep -q 'QUERY_STRING is set, but empty' || (cat /tmp/res.xml && /bin/false)

echo "Check again to make sure further errors are reported (#6543)"
curl -s "http://localhost/cgi-bin/mapserv.fcgi" > /tmp/res.xml
cat /tmp/res.xml | grep -q 'QUERY_STRING is set, but empty' || (cat /tmp/res.xml && /bin/false)

cd msautotest/wxs

export PATH=/tmp/install-mapserver/bin:$PATH
Expand Down
1 change: 1 addition & 0 deletions maperror.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ void msResetErrorList()

ms_error->next = NULL;
ms_error->code = MS_NOERR;
ms_error->isreported = MS_FALSE;
ms_error->routine[0] = '\0';
ms_error->message[0] = '\0';
ms_error->errorcount = 0;
Expand Down

0 comments on commit 29eb6fa

Please sign in to comment.