- Ctdl_GetUtf8SequenceLength(): testbyte needs to be unsigned char, else >> will shift us new bits in from the left
- we need to shift 'test' to the right
- start counting at 0
When QP encoding, we need to convert blanks to underscores
- Spamassasin test 'BAD_ENC_HEADER' matches if a subject looks like that:
Subject: =?UTF-8?Q?=5Btestml=5D l=C3=B6sch misch ey.?=
it needs to look like that:
Subject: =?UTF-8?Q?=5Btestml=5D_l=C3=B6sch_misch_ey.?=
Fix StrHtmlEcmaEscAppend() more edge cases in utf8 handling
- Ctdl_GetUtf8SequenceLength(): return 0 for broken, 1 for non-utf8 sequences
- StrHtmlEcmaEscAppend(): another attempt to fix json appending:
- use switch instead of Rumpelstilskin if sequence
- use HKEY for our static sequences
- don't check for buffer expansion again while utf8-handling; we have 11 bytes reserved, utf8 will at most become 6 bytes
- Simply handle ASCII chars in the utf8 loop
- since aptr is moved implicitely, we mustn't move it for the last byte
- add missing handling for some escapers
- let unicode escapers pass
parse reply-to header into its permanent database field
it seems as if some mailers (Open exchange for example) add Reply-To headers; if we don't parse it when receiving it,
our list service adds another header; thus parse it into the database of headers.
while appending the [roomname] to the mailsubject, we have to
- de-qp the original subject
- search for the roomname
- possibly prepend '[roomame] '
- and re-qp everything.
that way we solve...
- multiple [roomname] additions in case of QP encoded subjects
- non RFC-Conformant behaviour in case of roomnames with umlauts.
fix the GETMETADATA command; we mustn't count our naive split of the comand, it will fail if we have blanks in roomnames.
this fixes troubles seen with citadel <-> bynari connector.
Art Cancro [Wed, 15 Jun 2011 04:26:25 +0000 (00:26 -0400)]
xmpp_destroy_buddy() now accepts an 'aggressively' flag that indicates whether the server should push an 'unsubscribed' presence tag. Apparently we can only do this when sending a roster flush at the beginning of the session, because sending it when another user logs out in the middle of our session confuses Jitsi into thinking that the other user rejected a subscription request. I think it's making Pidgin behave better too, but more testing is needed.
- default is 30 seconds
- Server greeting 90 seconds (DNS lookups for RBLs might be slow
- Server sending the response to the EOM sequence; here we might have background processing like virus or spam scanning that wants to finish before finaly accepting the message.
we changed the SMTP outbound connections to be nonblocking so we could abort on not reacting SMTP-Servers.
thus we need to select before writing, else the connection will fail.
have flexible timouts while reading lines in our client mode connections
since some mailserver take a little longer to finish reading mails we need to wait after we send our '.\r\n'; its 90 seconds now, all other parts will wait 5s, quit will wait 1 second.
Don't send identity header if we want to do gzip compression
Propfind replies send 'Content-encoding: identity' right now, which is superseeded by the frameworks 'Content-encoding: gzip' in case of the client indicates this.
sending that headers twice has uncertain results depending on the client; while the RFC demands to evaluate the later, some fail to read our reply then.
* need to set & check errno that tells us whether our tempfile was fresh created or already there
* remove tmpfile on error
* don't use fopen() because we can't specify the flags we need for that
* ftruncate() the tempfile at the right place
Prevent writing empty network configs Part II
* writenfree_spoolcontrol_file ()
- serialise into a StrBuf
- write that to a tempfile in the netconfig directory
- if we fail, abort & log error
- if we succed use rename () to replace the original config file.
* cmd_snet: make shure the target FS has enough space for the new config
- Create our own filename insteaf of using mk*tmp*; CC->cs_pid should be uniq.; we use O_CREAT|O_EXCL so we're shure its ours or fails.
- Create that filename in the same directory as the filal config filename; by that we can be shure its in the same filesystem, and if thats full, we will fail
- Stat the original file for sise (if not there assume 80) and write twice as much into that file so we're next to shure the content from the client will fit in
- the citadel protocol is a little st00pit here, we don't know the size in advance, and we can't return an error _after_ accepting the file
- instead of moving the content of the tempfile into the final file, we use rename() which is supposed to be atomic.
* sock_getln (): CtdlSockGetLine() gives us lines without \r\n, no need to look for them again
* sock_getln_err (): add integer pointer returning the actual return state in case of error
* ml_sock_gets (): use sock_getln_err () so we can abort on impropper replies
* smtp_try (): make socket nonblocking, so we can abort on error
-> we will wait 5 seconds for the remote site to send us the SMTP-State else we will abort the connection on failure.