I don't know anything about using external loggers with MHD and this isn't really any of my business, but filtering log messages based on the string seems like a bad idea. That string could change in future releases (plus I guess you're doing extra string comparisons, but I doubt that amounts to very much).
If MHD doesn't provide some kind of 'message code' or a #define constant for the string (so you could compare it to something consistent), then maybe you could just log an extra message before you return MHD_NO? E.g., "Ignore the following message - there is no error - connection was intentionally refused."
Maybe it's just me, but I always try to promote easy maintenance and avoid fragility whenever it's reasonably possible. This seems like one of those times, albeit for a pretty minor thing.