On Fri, Dec 4, 2009 at 3:51 PM, Saikat Chakrabarti <[email protected]> wrote:
> Just tried with telnetting into the server, but whenever I am doing a
> put command, I get bad format (and if I type just "put" I get
> UNKNOWN_COMMAND):
>
> put 1 0 60 10\r\ntest\r\n
> BAD_FORMAT
>
> Am I messing up the protocol here?

In telnet, you would type:

    put 1 0 60 4
    test

When you press "Enter", telnet sends a CR and LF [1], which are
sometimes notated as "\r" and "\n". The last number in the first line
of put should be the number of bytes in the job body, excluding the
trailing CR LF. In this case it's 4 for "t", "e", "s", and "t".

You get UNKNOWN_COMMAND because the server is a little lazy about
parsing. It only recognizes "put" if a space comes after it. That is
arguably a bug.

kr

[1] http://en.wikipedia.org/wiki/ASCII#ASCII_control_characters

--

You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en.


Reply via email to