Looks like twitter is updating something and their servers are
returning error 417 for a lot of requests. I looked into it and found
that .NET automatically includes an Expect header containing "100-
continue" on every request unless you specifically tell it not to.
So for any .NET devs having trouble, you can set
System.Net.ServicePointManager.Expect100Continue = false before making
your request to get past this issue.
On Tue, Dec 23, 2008 at 20:31, JakeS <jakesteven...@gmail.com> wrote:
> Looks like twitter is updating something and their servers are > returning error 417 for a lot of requests. I looked into it and found > that .NET automatically includes an Expect header containing "100- > continue" on every request unless you specifically tell it not to.
> So for any .NET devs having trouble, you can set > System.Net.ServicePointManager.Expect100Continue = false before making > your request to get past this issue.
> Looks like twitter is updating something and their servers are
> returning error 417 for a lot of requests. I looked into it and found
> that .NET automatically includes an Expect header containing "100-
> continue" on every request unless you specifically tell it not to.
> So for any .NET devs having trouble, you can set
> System.Net.ServicePointManager.Expect100Continue = false before making
> your request to get past this issue.
Is this expected behavior now for Twitter or is this a bug in the new
Twitter release (Not supporting the Expect: Continue header). I'm
writing a multi-service Windows Mobile application and I'd prefer not
changing global http connection settings if I don't have to.
> On Tue, Dec 23, 2008 at 20:31, JakeS <jakesteven...@gmail.com> wrote:
> > Looks like twitter is updating something and their servers are
> > returning error 417 for a lot of requests. I looked into it and found
> > that .NET automatically includes an Expect header containing "100-
> > continue" on every request unless you specifically tell it not to.
> > So for any .NET devs having trouble, you can set
> > System.Net.ServicePointManager.Expect100Continue = false before making
> > your request to get past this issue.
> Is this expected behavior now for Twitter or is this a bug in the new > Twitter release (Not supporting the Expect: Continue header). I'm > writing a multi-service Windows Mobile application and I'd prefer not > changing global http connection settings if I don't have to.
Strictly speaking, according to the HTTP spec, it was a bug to *accept* Expect 100-continue and *not* return a 417 if you weren't prepared to handle it. See RFC 2616, 14.20. Thus, Twitter's Apache was buggy *before*, but not now.
There are arguments for shooting first and asking questions later (i.e., send Expect: headers all the time even if the remote server doesn't handle it right), but clients that shoot first should be prepared to retry the request without Expect: because there are still many servers that don't know what to do with it. There are also ambiguous situations with servers that don't understand the header at all and just ignore it; see Section 8.2.3.
-- ------------------------------------ personal: http://www.cameronkaiser.com/ -- Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com -- Ninety-nine percent of lawyers give the rest a bad name. -------------------
On Dec 24, 4:31 am, JakeS <jakesteven...@gmail.com> wrote:
> Looks like twitter is updating something and their servers are
> returning error 417 for a lot of requests. I looked into it and found
> that .NET automatically includes an Expect header containing "100-
> continue" on every request unless you specifically tell it not to.
> So for any .NET devs having trouble, you can set
> System.Net.ServicePointManager.Expect100Continue = false before making
> your request to get past this issue.
A lot of libraries follow this behaviour. A Twitter app I wrote in PHP
a while back has been logging 417s most of today. I logged in and
added:
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
Other libcurl-based libraries may be affected. There are plenty of
reports about 417 and Expect on the cURL website - http://curl.haxx.se/ - and on the websites of particular language bindings.
Started getting reports from users yesterday that they couldn't login
to hahlo.com.
Turns out that the check I run against "verify credentials" was also
returning code 417 instead of the usual/expected 200, so even though
the check was working to hahlo is looked like it was failing, changed
my check to include code 417 and now its working again.
Strangely though, a local dev copy of Hahlo 4, which also checks
"verify credentials" and also only expects a 200 response, is still
working fine..,
On Dec 25, 6:57 am, Tom Morris <t...@tommorris.org> wrote:
> On Dec 24, 4:31 am, JakeS <jakesteven...@gmail.com> wrote:
> > Looks like twitter is updating something and their servers are
> > returning error 417 for a lot of requests. I looked into it and found
> > that .NET automatically includes an Expect header containing "100-
> > continue" on every request unless you specifically tell it not to.
> > So for any .NET devs having trouble, you can set
> > System.Net.ServicePointManager.Expect100Continue = false before making
> > your request to get past this issue.
> A lot of libraries follow this behaviour. A Twitter app I wrote in PHP
> a while back has been logging 417s most of today. I logged in and
> added:
> curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
> Other libcurl-based libraries may be affected. There are plenty of
> reports about 417 and Expect on the cURL website -http://curl.haxx.se/ > - and on the websites of particular language bindings.
> Started getting reports from users yesterday that they couldn't login > to hahlo.com.
> Turns out that the check I run against "verify credentials" was also > returning code 417 instead of the usual/expected 200, so even though > the check was working to hahlo is looked like it was failing, changed > my check to include code 417 and now its working again.
> Strangely though, a local dev copy of Hahlo 4, which also checks > "verify credentials" and also only expects a 200 response, is still > working fine..,
> On Dec 25, 6:57 am, Tom Morris <t...@tommorris.org> wrote: >> On Dec 24, 4:31 am, JakeS <jakesteven...@gmail.com> wrote:
>>> Looks like twitter is updating something and their servers are >>> returning error 417 for a lot of requests. I looked into it and >>> found >>> that .NET automatically includes an Expect header containing "100- >>> continue" on every request unless you specifically tell it not to.
>>> So for any .NET devs having trouble, you can set >>> System.Net.ServicePointManager.Expect100Continue = false before >>> making >>> your request to get past this issue.
>> A lot of libraries follow this behaviour. A Twitter app I wrote in >> PHP >> a while back has been logging 417s most of today. I logged in and >> added: >> curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
>> Other libcurl-based libraries may be affected. There are plenty of >> reports about 417 and Expect on the cURL website -http:// >> curl.haxx.se/ >> - and on the websites of particular language bindings.
After investigating further it appears this only occurs for .NET
applications which post using form data instead of using URL
parameters. Here's a sample:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Credentials = new NetworkCredential(AccountInfo.UserName,
AccountInfo.Password);
request.PreAuthenticate = true;
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String
(Encoding.ASCII.GetBytes(AccountInfo.UserName + ":" +
AccountInfo.Password)));
byte[] bytes = Encoding.UTF8.GetBytes(data); //Data is what's being
posted
request.ContentLength = bytes.Length;
System.Net.ServicePointManager.Expect100Continue = false; //NEED
THIS NOW TO FIX ERROR 417
using (Stream requestStream = request.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
requestStream.Flush();
}
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse
())
{
using (StreamReader reader = new StreamReader
(response.GetResponseStream()))
{
return reader.ReadToEnd();
}
}
I don't doubt that it's a bug in the development platforms, but even
so it's a pretty common one. It doesn't appear to happen to those
apps which just URLEncode the data and include it in the URL, but I
don't think that's exactly proper specification either :)
On Dec 24, 1:57 pm, Tom Morris <t...@tommorris.org> wrote:
> On Dec 24, 4:31 am, JakeS <jakesteven...@gmail.com> wrote:
> > Looks like twitter is updating something and their servers are
> > returning error 417 for a lot of requests. I looked into it and found
> > that .NET automatically includes an Expect header containing "100-
> > continue" on every request unless you specifically tell it not to.
> > So for any .NET devs having trouble, you can set
> > System.Net.ServicePointManager.Expect100Continue = false before making
> > your request to get past this issue.
> A lot of libraries follow this behaviour. A Twitter app I wrote in PHP
> a while back has been logging 417s most of today. I logged in and
> added:
> curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
> Other libcurl-based libraries may be affected. There are plenty of
> reports about 417 and Expect on the cURL website -http://curl.haxx.se/ > - and on the websites of particular language bindings.
> After investigating further it appears this only occurs for .NET
> applications which post using form data instead of using URL
> parameters. Here's a sample:
> using (HttpWebResponse response = (HttpWebResponse)request.GetResponse
> ())
> {
> using (StreamReader reader = new StreamReader
> (response.GetResponseStream()))
> {
> return reader.ReadToEnd();
> }
> }
> I don't doubt that it's a bug in the development platforms, but even
> so it's a pretty common one. It doesn't appear to happen to those
> apps which just URLEncode the data and include it in the URL, but I
> don't think that's exactly proper specification either :)
> On Dec 24, 1:57 pm, Tom Morris <t...@tommorris.org> wrote:
> > On Dec 24, 4:31 am, JakeS <jakesteven...@gmail.com> wrote:
> > > Looks like twitter is updating something and their servers are
> > > returning error 417 for a lot of requests. I looked into it and found
> > > that .NET automatically includes an Expect header containing "100-
> > > continue" on every request unless you specifically tell it not to.
> > > So for any .NET devs having trouble, you can set
> > > System.Net.ServicePointManager.Expect100Continue = false before making
> > > your request to get past this issue.
> > A lot of libraries follow this behaviour. A Twitter app I wrote in PHP
> > a while back has been logging 417s most of today. I logged in and
> > added:
> > curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
> > Other libcurl-based libraries may be affected. There are plenty of
> > reports about 417 and Expect on the cURL website -http://curl.haxx.se/ > > - and on the websites of particular language bindings.
From the doc on MSDN "Changing the value of this property does not
affect existing ServicePoint objects. Only new ServicePoint objects
created after the change are affected. "
Make sure the statement
System.Net.ServicePointManager.Expect100Continue = false; is called in
the service contrutor and you should be fine.
On Dec 25, 2:21 pm, weiran <weir...@gmail.com> wrote:
> On Dec 24, 9:31 pm, PockeTwitDev <pocketwit...@gmail.com> wrote:
> > After investigating further it appears this only occurs for .NET
> > applications which post using form data instead of using URL
> > parameters. Here's a sample:
> > I don't doubt that it's a bug in the development platforms, but even
> > so it's a pretty common one. It doesn't appear to happen to those
> > apps which just URLEncode the data and include it in the URL, but I
> > don't think that's exactly proper specification either :)
> > On Dec 24, 1:57 pm, Tom Morris <t...@tommorris.org> wrote:
> > > On Dec 24, 4:31 am, JakeS <jakesteven...@gmail.com> wrote:
> > > > Looks like twitter is updating something and their servers are
> > > > returning error 417 for a lot of requests. I looked into it and found
> > > > that .NET automatically includes an Expect header containing "100-
> > > > continue" on every request unless you specifically tell it not to.
> > > > So for any .NET devs having trouble, you can set
> > > > System.Net.ServicePointManager.Expect100Continue = false before making
> > > > your request to get past this issue.
> > > A lot of libraries follow this behaviour. A Twitter app I wrote in PHP
> > > a while back has been logging 417s most of today. I logged in and
> > > added:
> > > curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
> > > Other libcurl-based libraries may be affected. There are plenty of
> > > reports about 417 and Expect on the cURL website -http://curl.haxx.se/ > > > - and on the websites of particular language bindings.
> > > --
> > > Tom Morris (@tommorris)
> > > <http://tommorris.org>- Hide quoted text -
> Looks like twitter is updating something and their servers are
> returning error 417 for a lot of requests. I looked into it and found
> that .NET automatically includes an Expect header containing "100-
> continue" on every request unless you specifically tell it not to.
> So for any .NET devs having trouble, you can set
> System.Net.ServicePointManager.Expect100Continue = false before making
> your request to get past this issue.
> Thanks for posting this information. We've applied these changes and
> our application is back to normal.
> Regards;
> -Wayne
> On Dec 23 2008, 8:31 pm, JakeS <jakesteven...@gmail.com> wrote:
> > Looks like twitter is updating something and their servers are
> > returning error 417 for a lot of requests. I looked into it and found
> > that .NET automatically includes an Expect header containing "100-
> > continue" on every request unless you specifically tell it not to.
> > So for any .NET devs having trouble, you can set
> > System.Net.ServicePointManager.Expect100Continue = false before making
> > your request to get past this issue.- Hide quoted text -
Try moving your System.Net.ServicePointManager.Expect100Continue = false higher in your method before you create your WebRequest object, that should help.
> On Jan 2, 1:06 am, Joint Contact <i...@arbutusinc.com> wrote: > > Thanks for posting this information. We've applied these changes and > > our application is back to normal.
> > Regards;
> > -Wayne
> > On Dec 23 2008, 8:31 pm, JakeS <jakesteven...@gmail.com> wrote:
> > > Looks like twitter is updating something and their servers are > > > returning error 417 for a lot of requests. I looked into it and found > > > that .NET automatically includes an Expect header containing "100- > > > continue" on every request unless you specifically tell it not to.
> > > So for any .NET devs having trouble, you can set > > > System.Net.ServicePointManager.Expect100Continue = false before making > > > your request to get past this issue.- Hide quoted text -
> Try moving your System.Net.ServicePointManager.Expect100Continue = false
> higher in your method before you create your WebRequest object, that should
> help.
> On Tue, Jan 6, 2009 at 6:49 AM, Vivek <vivek.shrivas...@gmail.com> wrote:
> > Hi,
> > We are getting same (417) error back in our website.
> > On Jan 2, 1:06 am, Joint Contact <i...@arbutusinc.com> wrote:
> > > Thanks for posting this information. We've applied these changes and
> > > our application is back to normal.
> > > Regards;
> > > -Wayne
> > > On Dec 23 2008, 8:31 pm, JakeS <jakesteven...@gmail.com> wrote:
> > > > Looks like twitter is updating something and their servers are
> > > > returning error 417 for a lot of requests. I looked into it and found
> > > > that .NET automatically includes an Expect header containing "100-
> > > > continue" on every request unless you specifically tell it not to.
> > > > So for any .NET devs having trouble, you can set
> > > > System.Net.ServicePointManager.Expect100Continue = false before making
> > > > your request to get past this issue.- Hide quoted text -
I had some trouble with this. My app were making two webrequests, to
two different servers.
The first one never experiences any issues with the 417 error and I
added 100Cont = false to all my Twitter requestes.
it turned out,
My app needed
System.Net.ServicePointManager.Expect100Continue = false
on all webrequests not only those going to Twitter
Then everything is fine. :)
On Jan 7, 8:21 am, Vivek <vivek.shrivas...@gmail.com> wrote:
> thanxs for replying, i have tried as per you mention.
> But no success, still getting (417) error.
> Vivek Shrivastav
> Invitratech India
> On Jan 6, 7:01 pm, "Maxfield Pool" <maxfield.p...@gmail.com> wrote:
> > Try moving your System.Net.ServicePointManager.Expect100Continue = false
> > higher in your method before you create your WebRequest object, that should
> > help.
> > On Tue, Jan 6, 2009 at 6:49 AM, Vivek <vivek.shrivas...@gmail.com> wrote:
> > > Hi,
> > > We are getting same (417) error back in our website.
> > > On Jan 2, 1:06 am, Joint Contact <i...@arbutusinc.com> wrote:
> > > > Thanks for posting this information. We've applied these changes and
> > > > our application is back to normal.
> > > > Regards;
> > > > -Wayne
> > > > On Dec 23 2008, 8:31 pm, JakeS <jakesteven...@gmail.com> wrote:
> > > > > Looks like twitter is updating something and their servers are
> > > > > returning error 417 for a lot of requests. I looked into it and found
> > > > > that .NET automatically includes an Expect header containing "100-
> > > > > continue" on every request unless you specifically tell it not to.
> > > > > So for any .NET devs having trouble, you can set
> > > > > System.Net.ServicePointManager.Expect100Continue = false before making
> > > > > your request to get past this issue.- Hide quoted text -
The '417- Expectation failed error' occurs again for me while updating
status. I am using the Yedda Twitter library. I have already added
'System.Net.ServicePointManager.Expect100Continue = false;' to my
Posting function:
I tried changing the position of
'System.Net.ServicePointManager.Expect100Continue = false;' to above
the WebRequest object creation, but that also does n't help.
This occurs in random. Please help me out of this situation as this
has been happening since a week now.
Thanks in advance
On Feb 23, 7:51 pm, ErikAkerfeldt <erik...@gmail.com> wrote:
> I had some trouble with this. My app were making two webrequests, to
> two different servers.
> The first one never experiences any issues with the 417 error and I
> added 100Cont = false to all my Twitter requestes.
> it turned out,
> My app needed
> System.Net.ServicePointManager.Expect100Continue = false
> on all webrequests not only those going to Twitter
> Then everything is fine. :)
> On Jan 7, 8:21 am, Vivek <vivek.shrivas...@gmail.com> wrote:
> > Hi,
> > thanxs for replying, i have tried as per you mention.
> > But no success, still getting (417) error.
> > Vivek Shrivastav
> > Invitratech India
> > On Jan 6, 7:01 pm, "Maxfield Pool" <maxfield.p...@gmail.com> wrote:
> > > Try moving your System.Net.ServicePointManager.Expect100Continue = false
> > > higher in your method before you create your WebRequest object, that should
> > > help.
> > > On Tue, Jan 6, 2009 at 6:49 AM, Vivek <vivek.shrivas...@gmail.com> wrote:
> > > > Hi,
> > > > We are getting same (417) error back in our website.
> > > > On Jan 2, 1:06 am, Joint Contact <i...@arbutusinc.com> wrote:
> > > > > Thanks for posting this information. We've applied these changes and
> > > > > our application is back to normal.
> > > > > Regards;
> > > > > -Wayne
> > > > > On Dec 23 2008, 8:31 pm, JakeS <jakesteven...@gmail.com> wrote:
> > > > > > Looks like twitter is updating something and their servers are
> > > > > > returning error 417 for a lot of requests. I looked into it and found
> > > > > > that .NET automatically includes an Expect header containing "100-
> > > > > > continue" on every request unless you specifically tell it not to.
> > > > > > So for any .NET devs having trouble, you can set
> > > > > > System.Net.ServicePointManager.Expect100Continue = false before making
> > > > > > your request to get past this issue.- Hide quoted text -
> > > > > - Show quoted text -- Hide quoted text -