inicio mail me! sindicaci;ón

Updates from Python SVN, Part 6

urllib2 does not raise exceptions if the HTTP Status Code is a 2xx one. Previously it checked only for response code 200 and 206.

Related posts

  • Updates from Python SVN, Part 12
  • Updates from Python SVN, Part 10
  • Updates from Python SVN, Part 11
  • Updates from Python SVN, Part 16
  • Reddit has got me
  • Gravatar

    Chris said,

    August 5, 2007 @ 11:11 pm

    Maybe I am ignorant but I stumbled across this post by accident. So sorry in advance bu if I do seem to be just rambling. But I did wonder: I used a hacked version of urllib2 to do a PUT request which normally results in a “201 CREATED”. This does give an Exception with an “error” of 201. 201 is no “error” though, is it not? BTW, are there any plans to add PUT and DELETE support to urllib2? The hack I started did seem to work quite well so I wondered if it may be worth trying to submit a patch, but I guess there are much more capable people who would do this.

    Gravatar

    Lawrence said,

    August 6, 2007 @ 12:05 am

    No, 201 is not considered as an error code. Maybe the hacked implementations does. As submitting the patch or not I guess you should raise the PUT/DELETE issue in python-dev first, then if someone is interested submit the patch or do it at the same time. Good luck!

    RSS feed for comments on this post · TrackBack URI

    Leave a Comment