Christof Meerwald@blog.www | |||||||
home |
Mon Feb 16 21:27:05 2009 GMT: msnbot considered harmful Sat Feb 14 17:27:08 2009 GMT: Switched broadband connection to IDNet Sun Feb 08 15:47:27 2009 GMT: Xref header filtering for newscache I have finally implemented Xref header filtering in newscache. This is useful as some newsreaders (like slrn) get confused by incorrect Xref headers. If you have configured only a single upstream server in newscache, you won't see the problem, but if you are using different upstream servers for different hierarchies (as I do) and you happen to be reading an article that has been cross-posted to those hierarchies, not all article numbers in the Xref header are valid. Let's look at an example: say you have 2 upstream servers (s1.example.com for hier1.* and s2.example.com for hier2.*) configured in newscache and an article has been posted to hier1.test and hier2.test. On s1.example.com the Xref header might look like "Xref: s1.example.com hier1.test:210 hier2.test:220" and on s2.example.com the Xref header might look like "Xref: s2.example.com hier1.test:110 hier2.test:120". Now if you are reading the article in hier1.test (via s1.example.com) you don't want newscache to return the Xref header as is because article number 220 in hier2.test refers to a different article on your system (as you are reading hier2.test via s2.example.com). Ideally, you would want newscache to return the correct article number for hier2.test in the Xref header, but that would involve too much processing (as you might have to fetch the article from s2.example.com to get the article number). The next best thing (and this is what I have implemented) is to filter the Xref header to only include groups you are reading via the same server. So if you are reading the article in hier1.test, you will get "Xref: s1.example.com hier1.test:210" and if you are reading the article in hier2.test, you will get "Xref: s2.example.com hier2.test:120" for the Xref headers. This means that your newsreader might not be able to automatically mark the article as read in the other newsgroup. As always, the package for Ubuntu hardy heron (i386 and amd64) is available from my .deb packages page. BTW, thanks to Henrik for pointing out how to clarify the initial version of this blog post. Mon Feb 02 18:05:46 2009 GMT: Finally some snow around here and the country almost comes to a standstill with complete chaos. Sat Jan 31 10:23:16 2009 GMT: (Ab)Using OpenVPN OpenVPN is a great VPN application for both Windows and Unix/Linux platforms, but it can also be of great help in situations where it's not immediatly obvious. Because it provides a mode of operation where IP packets are tunneled in cleartext via UDP, you can actually feed your IP packets to a Python application and then do any packet munging you like in Python without having to think about low-level OS APIs - and it's portable across any OpenVPN-supported platforms. Sat Jan 31 10:05:03 2009 GMT: Twinkle 1.4 Bug Last weekend a new version of my favourite soft-phone was released, but unfortunately, it contained a serious bug when compiled with an old version of the (or no) speex library which results in no outgoing audio. I have been able to track down and fix the bug. BTW, a package for Ubuntu hardy heron with that fix is available from my .deb packages page. Sun Jan 04 16:17:39 2009 GMT: Python DB-API Rant SQLite really is a great database engine, but as it only supports database-wide locks, it's not really suitable if you want to concurrently access the database from different threads/processes. So I though, just switch to PostgreSQL which should be easy in theory as I am already using Python's DB-API 2.0. Unfortunately, it's not that easy in practise, as the DB-API specification is not strict enough to make it really useful (and implementations have their own bugs on top of that). The main issue is that Python's built-in sqlite3 module uses "?" as the placeholder in prepared statements, whereas all PostgreSQL DB-API implementations use Python format strings (e.g. "%s") as placeholders. To make matters worse, some implementations expect "%d" for integer parameters, while others expect "%s". So, essentially you can't use plain DB-API to write portable applications, but need another abstraction layer on top of it... Sat Dec 27 21:24:53 2008 GMT: vAdmin SNMP Service Mon Dec 22 10:26:51 2008 GMT: 64-bit vServer Sun Dec 21 10:21:31 2008 GMT: Server Migration Mon Nov 17 20:29:55 2008 GMT: New Scientist Redesign Mon Nov 10 21:22:00 2008 GMT: Seeing telecom data retention as an opportunity | ||||||
This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.
Revision: 1.14, cmeerw.org/blog/590.html Last modified: Mon Sep 03 18:19:55 2018 |
Christof Meerwald <cmeerw@cmeerw.org> XMPP: cmeerw@cmeerw.org |