ruby: unexpected token SPACE (2006-08-12 23:55 by Anonymous #24346)
The following started happening a week ago without any changes in the local software setup. System is Debian testing, ruby 1.8.2-1, bsfilter 1:1.0.13-1. Any ideas?
/usr/lib/ruby/1.8/net/imap.rb:3104:in `parse_error': unexpected token SPACE (Net
::IMAP::ResponseParseError)
from /usr/lib/ruby/1.8/net/imap.rb:2917:in `atom'
from /usr/lib/ruby/1.8/net/imap.rb:2714:in `capability_response'
from /usr/lib/ruby/1.8/net/imap.rb:1972:in `response_untagged'
from /usr/lib/ruby/1.8/net/imap.rb:1930:in `response'
from /usr/lib/ruby/1.8/net/imap.rb:1856:in `parse'
from /usr/lib/ruby/1.8/net/imap.rb:996:in `get_response'
from /usr/lib/ruby/1.8/net/imap.rb:925:in `receive_responses'
from /usr/lib/ruby/1.8/net/imap.rb:918:in `initialize'
from /usr/lib/ruby/1.8/net/imap.rb:917:in `initialize'
from /usr/bin/bsfilter:2682:in `do_imap'
from /usr/bin/bsfilter:3321:in `run'
from /usr/bin/bsfilter:3373
RE: ruby: unexpected token SPACE (2006-08-13 00:22 by nabeken #24348)
It seems to be a problem between IMAP server and a standard library of ruby.
Do you have any information about your IMAP server? (program name, revision, authentication method ...)
RE2: ruby: unexpected token SPACE (2006-08-13 00:38 by Anonymous #24351)
There seems to be an extra space (totalling two) between the NAMESPACE and IDLE capabilities in the response from the server. Maybe this confuses Ruby's IMAP library?
RE: RE2: ruby: unexpected token SPACE (2006-08-13 00:59 by Anonymous #24352)
This seems to be the case. It is probably a mistake in the server configuration but can be overcome with a following temporary workaround to the Ruby IMAP library:
RE: RE2: ruby: unexpected token SPACE (2006-08-13 01:14 by nabeken #24354)
I added "extra space" to my local IMAP server and confirmed your patch worked.
RFC2060 defines the format of CAPABILITY. I'm not sure multiple SPACEs are regal.
capability_data ::= "CAPABILITY" SPACE [1#capability SPACE] "IMAP4rev1"
[SPACE 1#capability]
;; IMAP4rev1 servers which offer RFC 1730
;; compatibility MUST list "IMAP4" as the first
;; capability.