[Twisted-Python] Woven and WML

Tim Allen screwtape at froup.com
Sat May 31 01:29:54 EDT 2003

I recently got a new WAP-capable phone, and since you can do a lot of 
interesting things by pointing it at various URLs, I thought I'd try 
making a cute little website in Woven for my phone to browse.

Unfortunately, it seems that this is impossible. The resulting markup 
from my simple Woven test page had all sorts of woven-stuff all through 
it - such as pattern attributes that hadn't been removed, and id 
attributes that were woven's internal IDs, rather than the IDs I tried 
to set. Modern, capacious HTML browsers wouldn't care, I guess, but my 
phone's little brain overloaded and gave up.

Is this just the way Woven works, or am I likely doing something wrong?

For the record, twisted.web can serve up static WML just fine, provided 
the following patch is applied:

Index: twisted/web/static.py
RCS file: /cvs/Twisted/twisted/web/static.py,v
retrieving revision 1.91
diff -u -r1.91 static.py
--- twisted/web/static.py       13 May 2003 04:36:21 -0000      1.91
+++ twisted/web/static.py       31 May 2003 05:25:41 -0000
@@ -175,6 +175,7 @@
          ".tif": "image/tiff",
          ".tiff": "image/tiff",
          ".txt": "text/plain",
+        ".wml": "text/vnd.wap.wml",
          ".xul": "application/vnd.mozilla.xul+xml",
          ".zip": "application/x-zip",
          ".patch": "text/plain",

More information about the Twisted-Python mailing list