]> granicus.if.org Git - apache/commitdiff
* Handle the case that secure is NULL
authorRuediger Pluem <rpluem@apache.org>
Tue, 27 May 2008 10:50:23 +0000 (10:50 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 27 May 2008 10:50:23 +0000 (10:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@660461 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index 4efd7cfa884860c99b872b6c0557f4773e97124b..91d2a69090e91418640bafb0d74699596478fc23 100644 (file)
@@ -2492,7 +2492,9 @@ static void add_cookie(request_rec *r, char *s)
                                  "; domain=", domain,
                                  expires ? "; expires=" : NULL,
                                  expires ? exp_time : NULL,
-                                 (strcasecmp(secure, "true") == 0 || strcasecmp(secure, "1") == 0) ? "; secure" : NULL,
+                                 secure ? ((strcasecmp(secure, "true") == 0
+                                           || strcasecmp(secure, "1") == 0) ?
+                                           "; secure" : NULL) : NULL,
                                  httponly ? "; HttpOnly" : NULL, 
                                  NULL);