Impossible to send some errors on Mantis due to http 500 err
Impossible to send some errors on Mantis due to http 500 err
Hi, I'm trying to debug madExcept sending issues to a Mantis server. Sometimes the send process is stopped and madExecpt returns me a SendFailureMsg message. Now I have a case in my main software that I can reproduce. Debugging the code I could see that ReceiveResponse of the FinishMantisCall gets a 500 http error and so the process is stopped. Sometimes I could see the new item added in the mantis without attachments, sometimes I couldn't see the items.
I'm using the latest Mantis version 1.2.19 and the program is compiled with D10 seattle with madExcept 4.0.13.
Any idea?
Davide
I'm using the latest Mantis version 1.2.19 and the program is compiled with D10 seattle with madExcept 4.0.13.
Any idea?
Davide
Re: Impossible to send some errors on Mantis due to http 500
That seems to be a problem on the Mantis side, doesn't it? Why would it send 500? So far no other user has reported a similar issue. I'm not really that much of a Mantis expert. Is there maybe some logging you can turn on to find out *why* the server is sometimes reporting 500?
Re: Impossible to send some errors on Mantis due to http 500
I think that could be a mantis problem too. I'm now creating a server on a VM to do tests to see if could be a problem of the real world server in which is not so esy to do experiments. At first time I thought that could be a problem with the xml command: I always add a custom section (calling exceptIntF.BugReportSections.Add) and sometimes in the text added there are special characters like "&" that could create some problems with xml code, but now that I'm testing it I removed the custom section but the problem persists.
Re: Impossible to send some errors on Mantis due to http 500
If you find anything, please let me know - thanks!
Re: Impossible to send some errors on Mantis due to http 500
Mantis forums tells that generally a 500 err is caused by wrong parameters so I investigate in that way. My first thought was right: the problem was with no standard characters (in my case with "&"). When the exception is raised I customize at runtime some madExcept settings so I add some text to "Settings.BugTrackerDescription". In this text, in my error case, there was an "&" character. This seems no safe to pass to XML mantis code. I solved it by making XML safe the string that I add to the bug description. I don't know if you want to do that in madExcept units to avoid this kind of problem for other mantis users.
Thanks
Davide
Thanks
Davide
Re: Impossible to send some errors on Mantis due to http 500
Thanks for researching this!
Do you know which characters are considered problematic? Then I can simply replace them with something else in madExcept.
Do you know which characters are considered problematic? Then I can simply replace them with something else in madExcept.
Re: Impossible to send some errors on Mantis due to http 500
I know almost for sure these: "&", ">", "<" but in general I think all the characters that can be used in xml syntax. I create a little function that substitute "&" with "&", ">" with ">" and "<" with "<". I also substitute the double quote character " with ' because in xml files it could be used to specify data attributes.