client.getPage errors on http status 204

[email protected] Tue, 01 Sep 2009 07:09:41 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from drewp <[email protected]>:

204 is No Content, and I don't think twisted should consider that an error. Probably none of the 2xx codes should make an error. Their metadata should be available to the callback in another way.

Here's an example for trac to mangle up:

client.getPage("http://my-local-hookah-server:9030/subscribe",
               method="POST",
               headers={'Content-Type' : 'application/x-www-form-urlencoded'},
               postdata=urllib.urlencode({
                   'hub.mode' : 'subscribe',
                   'hub.callback' : 'http://host2:9992/',
                   'hub.topic' : 'sms',
                   'hub.verify' : 'sync'}))
->
2009-08-31 23:48:48-0700 [HTTPPageGetter,client] Unhandled Error
	Traceback (most recent call last):
	Failure: twisted.web.error.Error: 204 No Content


----------
Type     : enhancement
Component: web
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3993