From: David ‘Bombe’ Roden Date: Wed, 14 Sep 2011 05:42:46 +0000 (+0200) Subject: Use returned page response. This fixes redirects. X-Git-Tag: 0.7^2~7 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=dfa177be32dfce033edcfa5d61695e75a8efaa38;p=Sone.git Use returned page response. This fixes redirects. --- diff --git a/src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java b/src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java index ed01294..2d1f35a 100644 --- a/src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java +++ b/src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java @@ -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 headers = new MultiValueTable(); if (pageResponse.getHeaders() != null) { for (Header header : pageResponse.getHeaders()) {