Simon Willison’s Weblog

Subscribe
Atom feed for http Random

124 posts tagged “http”

2003

The Python Web SIG

Python now has a Web SIG. SIGs are Special Interest Groups, each with a target to develop and improve a certain aspect of the Python language, standard library or community. The Web SIG has two purposes: create a plan for improving Python’s web client abilities (including things like the ability to parse CSS) and work on improving Python’s server side capabilities.

[... 289 words]

Python Client Libraries

Three really useful looking Python modules: ClientForm, ClientTable and ClientCookie. ClientForm looks like it provides similar functionality to the form handling part of the WWW::Mechanize perl module, discussed previously. It essentially provides a very simple interface for loading an HTML page, parsing out the form information then filling in the form and submitting it back to the server. The author recommends it for automated testing (I’ve always had trouble figuring out how to link unit testing in to web applications) but I’m sure it could be useful for screen scraping tools as well. ClientTable is an early beta of a powerful looking table parser, and ClientCookie sits on top of the standard urllib library and transparently persists cookies in between requests.

HTTP status codes

Craig Saila has a minor rant about HTTP error codes. Did you know that a 410 should be served instead of a 404 when a resource has been deliberately, permanently removed? I didn’t.

2002

Debugging HTTP headers

Tantek has released two new favelets for revealing HTTP information, using Mozilla’s ever useful Web Sniffer and Delorie’s HTTP Header Viewer. I spotted a similar tool on a recent trip to MozDev: LiveHTTPHeaders adds a “Headers” tab to the page information box in Mozilla 1.2, showing the full request and response headers used for the current page. It’s a very nice tool, but unfortunately does not yet work with Phoenix (the headers tab is added to the info box but the header information does not appear).