Use a 301 permanent redirect if no controller given
authorMartin Willi <martin@revosec.ch>
Mon, 26 Apr 2010 07:41:10 +0000 (09:41 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 28 Apr 2010 06:30:21 +0000 (08:30 +0200)
src/libfast/session.c

index f03b755..7c4548e 100644 (file)
@@ -177,7 +177,9 @@ static void process(private_session_t *this, request_t *request)
                if (this->controllers->get_first(this->controllers,
                                                                                 (void**)&current) == SUCCESS)
                {
                if (this->controllers->get_first(this->controllers,
                                                                                 (void**)&current) == SUCCESS)
                {
-                       request->redirect(request, current->get_name(current));
+                       request->streamf(request,
+                               "Status: 301 Moved permanently\nLocation: %s/%s\n\n",
+                               request->get_base(request), current->get_name(current));
                }
        }
 }
                }
        }
 }