Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

'version' and 'dump-stats' command shoud not be returned extra new line. #58

Merged
merged 1 commit into from

2 participants

@ghost

'version' and 'dump-stats' command shoud not be returned extra new line.
Currently these commands returns redundant empty line.
Client libraries for memcached (such as xmemcached) does not expect empty line.

@hito-asa

xmemcached uses 'version' command for heatbeat.
Redundant empty line occurs TimeoutException on next get/set command.
This problem did not occur on kestre-1.2.6.

@robey
Collaborator

ooh good catch.

@robey robey merged commit f7e215b into from
@hito-asa hito-asa 'version' and 'dump-stats' command shoud not be returned extra new line.
Currently these commands returns redundant empty line.
Client libraries for memcached (such as xmemcached) does not expect empty line.
634da0d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 30, 2011
  1. @hito-asa

    'version' and 'dump-stats' command shoud not be returned extra new line.

    hito-asa authored
    Currently these commands returns redundant empty line.
    Client libraries for memcached (such as xmemcached) does not expect empty line.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/scala/net/lag/kestrel/MemcacheHandler.scala
View
4 src/main/scala/net/lag/kestrel/MemcacheHandler.scala
@@ -216,11 +216,11 @@ extends NettyHandler[MemcacheRequest](channelGroup, queueCollection, maxOpenTran
dump += queues.stats(qName).map { case (k, v) => k + "=" + v }.mkString(" ", "\r\n ", "")
dump += "}"
}
- channel.write(new MemcacheResponse(dump.mkString("", "\r\n", "\r\nEND\r\n")))
+ channel.write(new MemcacheResponse(dump.mkString("", "\r\n", "\r\nEND")))
}
private def version() = {
- channel.write(new MemcacheResponse("VERSION " + Kestrel.runtime.jarVersion + "\r\n"))
+ channel.write(new MemcacheResponse("VERSION " + Kestrel.runtime.jarVersion))
}
private def quit() = {
Something went wrong with that request. Please try again.