BenAnderson.net

a window into my world.
 
 

Twitter Turns off HTTP 1.1 requests

by Benjamin Anderson 11. January 2009 21:03

If you're a .NET developer and you've worked with interop projects before, you've more than likely run into problems with HTTP 1.0 vs. HTTP 1.1 support.  .NET supports 1.1 by default, and as a result will break requests and responses up with the HTTP 100 continue header status.  Twitter apparently turned off HTTP 1.1 within the last week or two.  As a result my extenstion for my blog had to be modified since it was throwing as exception when trying to post to Twitter.

 

Adding System.Net.ServicePointManager.Expect100Continue = false; to your code before making the post will fix the problem.  In a web app though, you'll want to turn it back on afterwards.  Switching states isn't a good thing, and it is application wide, so be aware of the changes.

Tags: , ,

Categories: .NET

Sponser

I review for BookSneeze

About the author

Benjamin is a software developer in the DFW area.  He spends his free time playing video games, programming, doing graphics design and photography, and reading.

Month List

Page List

    Widget BookShelf not found.

    The file '/Blog/widgets/BookShelf/widget.ascx' does not exist.X

    Categories

    Tags