Permalink
Browse files

more cleanup

  • Loading branch information...
1 parent 4fd7914 commit 1c423a36157157bcbbafcb2fc2d8ffbb21beb4e8 @jrwest committed Feb 24, 2012
Showing with 8 additions and 37 deletions.
  1. +8 −37 src/main/scala/com/something/lift/NettyHttpResponse.scala
@@ -21,52 +21,23 @@ class NettyHttpResponse(ctx: ChannelHandlerContext) extends HTTPResponse {
r
}
- /**
- * Add cookies to the response
- *
- * @param cookies - the list of response cookies
- */
- def addCookies(cookies: List[HTTPCookie]) {} // FIXME // throw new Exception("Implement me")
+ // FIXME actually add cookies to the response
+ def addCookies(cookies: List[HTTPCookie]) {}
- /**
- * Encodes the URL such that it adds the session ID if it is necessary to the URL.
- * It is implementation specific detail how/if to add the session informations. This will be used
- * for URL rewriting purposes.
- *
- * @param url - the URL that needs to be analysed
- */
+ // FIXME add session id if/when sessions are supported?
def encodeUrl(url: String): String = url
- /**
- * Add a list of header parameters to the response object
- *
- * @param headers - the list of headers
- */
- def addHeaders(headers: List[HTTPParam]) {} // FIXME // throw new Exception("Implement me")
+ // FIXME actually set headers
+ def addHeaders(headers: List[HTTPParam]) {}
- /**
- * Sets the HTTP response status
- *
- * @param status - the HTTP status
- */
- def setStatus(status: Int) = nettyResponse.setStatus(HttpResponseStatus.valueOf(status)) //throw new Exception("Implement me")
+ def setStatus(status: Int) = nettyResponse.setStatus(HttpResponseStatus.valueOf(status))
- /**
- * Returns the HTTP response status that has been set with setStatus
- * */
def getStatus: Int = nettyResponse.getStatus.getCode
- /**
- * Sets the HTTP response status
- *
- * @param status - the HTTP status
- * @param reason - the HTTP reason phrase
- */
+ // FIXME
def setStatusWithReason(status: Int, reason: String) = throw new Exception("Implement me")
- /**
- * @return - the OutputStream that can be used to send down o the client the response body.
- */
+ // TODO make better: ovverride other write methods, better flush
def outputStream: OutputStream = new OutputStream {
// TODO: there is a probably a better impl, by override the other write methods.
def write(i: Int) {

0 comments on commit 1c423a3

Please sign in to comment.