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.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Categories: .NET

Comments

Sponser

I review for BookSneeze

About the author

Benjamin is a software developer for an solutions provider in Allen, TX.  He spends his free time playing video games, programming, doing graphics design and photography, and reading.

Page List

    Books I'm Currently Reading

    Pagan Christianity?: Exploring the Roots of Our Church Practices by Frank Viola & George Barna
    Microsoft® .NET Framework Application Development Foundation by Tony Northrup
    Professional Team Foundation Server by Jean-Luc David
    Everyday Greatness by stephen covey
    Programming Pearls by Jon Bentley
    Hacker's Delight by Henry S. Warren
    Flickering Pixels: How Technology Shapes Your Faith by Shane Hipps
    Less Clutter. Less Noise.: Beyond Bulletins, Brochures and Bake Saless Your Faith by Kim Meyer
    Young Guns: The Fearless Entrepreneur's Guide to Chasing Your Dreams and Breaking Out on Your Own by Robert Tuchman
    The Snowball: Warren Buffett and the Business of Life by Alice Schroeder