Use returned page response. This fixes redirects.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 14 Sep 2011 05:42:46 +0000 (07:42 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 14 Sep 2011 05:42:46 +0000 (07:42 +0200)
src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java

index ed01294..2d1f35a 100644 (file)
@@ -146,7 +146,7 @@ public class PageToadlet extends Toadlet implements LinkEnabledCallback {
                try {
                        pageBucket = pageRequest.getToadletContext().getBucketFactory().makeBucket(-1);
                        Response pageResponse = new Response(pageBucket.getOutputStream());
-                       page.handleRequest(pageRequest, pageResponse);
+                       pageResponse = page.handleRequest(pageRequest, pageResponse);
                        MultiValueTable<String, String> headers = new MultiValueTable<String, String>();
                        if (pageResponse.getHeaders() != null) {
                                for (Header header : pageResponse.getHeaders()) {