Skip to content

Commit

Permalink
Closes lift#1082. Fixes the damage done by 1054
Browse files Browse the repository at this point in the history
  • Loading branch information
dpp committed Aug 25, 2011
1 parent a276004 commit f254f08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/webkit/src/main/scala/net/liftweb/http/LiftResponse.scala
Expand Up @@ -370,14 +370,14 @@ case class OutputStreamResponse(out: (OutputStream) => Unit,
* 301 Redirect.
*/
case class PermRedirectResponse(uri: String, request: Req, cookies: HTTPCookie*) extends LiftResponse {
def toResponse = InMemoryResponse(Array(), List("Location" -> request.updateWithContextPath(uri)), cookies.toList, 301)
def toResponse = InMemoryResponse(Array(), List("Location" -> uri), cookies.toList, 301)
}

/**
* 307 Redirect.
*/
case class TemporaryRedirectResponse(uri: String, request: Req, cookies: HTTPCookie*) extends LiftResponse {
def toResponse = InMemoryResponse(Array(), List("Location" -> request.updateWithContextPath(uri)), cookies.toList, 307)
def toResponse = InMemoryResponse(Array(), List("Location" -> uri), cookies.toList, 307)
}

/**
Expand All @@ -398,7 +398,7 @@ object RedirectResponse {
*/
case class RedirectResponse(uri: String, request: Req, cookies: HTTPCookie*) extends LiftResponse {
// The Location URI is not resolved here, instead it is resolved with context path prior of sending the actual response
def toResponse = InMemoryResponse(Array(), List("Location" -> request.updateWithContextPath(uri),
def toResponse = InMemoryResponse(Array(), List("Location" -> uri,
"Content-Type" -> "text/plain"), cookies toList, 302)
}

Expand All @@ -420,7 +420,7 @@ object SeeOtherResponse {
*/
case class SeeOtherResponse(uri: String, request: Req, cookies: HTTPCookie*) extends LiftResponse {
// The Location URI is not resolved here, instead it is resolved with context path prior of sending the actual response
def toResponse = InMemoryResponse(Array(), List("Location" -> request.updateWithContextPath(uri),
def toResponse = InMemoryResponse(Array(), List("Location" -> uri,
"Content-Type" -> "text/plain"), cookies toList, 303)
}

Expand Down

0 comments on commit f254f08

Please sign in to comment.