Revision: 14345 Author: adrian.chadd Date: Tue Oct 27 00:34:59 2009 Log: Try to work around issue #49 for now - don't dereference NULL methods.
Benno's work on method_t changes have some unfortunate bugs with unset methods; and printing those out cause issues. This patch makes it print -something- invalid without it crashing the proxy. These issues should be tracked down and fixed, but for now, this is a reasonable workaround. http://code.google.com/p/lusca-cache/source/detail?r=14345 Modified: /branches/LUSCA_HEAD/src/url.c ======================================= --- /branches/LUSCA_HEAD/src/url.c Mon Oct 26 23:58:33 2009 +++ /branches/LUSCA_HEAD/src/url.c Tue Oct 27 00:34:59 2009 @@ -298,7 +298,11 @@ const char * urlMethodGetConstStr(method_t *method) { - /* XXX this will later on handle the incorrect case where method->string is NULL */ + /* XXX this should log a NULL method! */ + if (! method) + return "(NULL Method)"; + if (! method->string) + return "(NULL Method String)"; return method->string; } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "lusca-commit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/lusca-commit?hl=en -~----------~----~----~----~------~----~------~--~---
