[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread eclipsed4utoo

Ok.  nevermind.  I have it fixed now.

Since I am using OAuth, I am not writing a stream to the request object
(like I would do with Basic Auth).  So I changed the ContentLength to
0, and it works.

Could the response had been waiting for me to stream the content to it
since I told it the length?  I guess that could have cause the
indefinite hanging.

Ryan

On Oct 14, 6:59 pm, eclipsed4utoo  wrote:
> So any thoughts/ideas?
>
> Ryan
>
> On Oct 14, 12:09 pm, eclipsed4utoo  wrote:
>
>
>
> > Here is a screenshot right before make the request.
>
> >http://yfrog.com/8d10142009115958amp
>
> > You can see that there is only the "Content-Type" header.  But you can
> > also see that the ContentLength is set(to 6...length of my status
> > update).
>
> > .Net doesn't allow me to add the header manually if the object has a
> > property for that header.
>
> > Ryan
>
> > On Oct 14, 12:05 pm, ryan alford  wrote:
>
> > > Another question is, what has changed?  This code has been working fine
> > > since September 24th(sending the ContentLength).  Then on October 11th, I
> > > start having issues.
> > > Ryan
>
> > > On Wed, Oct 14, 2009 at 11:58 AM, ryan alford 
> > > wrote:
>
> > > > Other code uses this snippet also.
> > > > Now this is even more hilarious.  I am testing right now.  I am sending 
> > > > the
> > > > ContentLength no matter what.
>
> > > > I now can't post status updates again.  If I give it the ContentLength, 
> > > > it
> > > > just hangs.  If I don't give it the ContentLength, I get the error.
>
> > > > If I give it the ContentLength, I can send Direct Messages(length = 0). 
> > > >  If
> > > > I don't give it the ContentLength, I get the same error with direct
> > > > messages.
>
> > > > When I view the request header, the only header there is the
> > > > "Content-Type".
>
> > > > Ryan
>
> > > > On Wed, Oct 14, 2009 at 11:26 AM, Chad Etzel  wrote:
>
> > > >> On Wed, Oct 14, 2009 at 11:17 AM, ryan alford 
> > > >> wrote:
> > > >> > Here is the code...
> > > >> >http://pastebin.com/m7ea04ea2
> > > >> > Last night, that code worked(with the content length being commented
> > > >> out).
> > > >> >  This morning, it gives me the "length required" error.
> > > >> > Ryan
>
> > > >> I am not extremely familiar with C#, but you might want to run a trace
> > > >> to see what exactly the HTTP request headers are that you are sending.
> > > >> Are you calling this code only for posting an update? Or are there
> > > >> other methods using this code as well?  I know for requests like
> > > >> friendship/create you have to set the content-length to 0 for the
> > > >> request to work if you specify the username in the URL...
>
> > > >> -Chad
>
> > > >> > On Wed, Oct 14, 2009 at 11:09 AM, Chad Etzel  
> > > >> > wrote:
>
> > > >> >> Can you post your code snippet (in something like pastie or 
> > > >> >> pastebin)?
> > > >> >> Content-length should almost always be required for POSTs (from HTTP
> > > >> >> spec).
>
> > > >> >> -Chad
>
> > > >> >> On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo <
> > > >> ryanalford...@gmail.com>
> > > >> >> wrote:
>
> > > >> >> > Ok, this is really starting to screw with me.  On Sunday, I 
> > > >> >> > received
> > > >> >> > this error.  I put in code to send the content length when making 
> > > >> >> > a
> > > >> >> > status update.  It worked on Sunday.  On Monday, the POST request
> > > >> >> > started hanging.  For two days, I tried to figure out what the
> > > >> problem
> > > >> >> > was.  So last night, I removed the code to add the content length.
> > > >>  IT
> > > >> >> > WORKED!!!
>
> > > >> >> > Now, this morning, I am getting the error again that the length is
> > > >> >> > required.
>
> > > >> >> > So which is it?  Is the length required or not?  Last night it was
> > > >> not
> > > >> >> > required, this morning it is.  If I send it and it's not 
> > > >> >> > required, it
> > > >> >> > hangs the request indefinitely.  If I don't send it and it's
> > > >> required,
> > > >> >> > I get an error message.
>
> > > >> >> > Any help?


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread eclipsed4utoo

So any thoughts/ideas?

Ryan

On Oct 14, 12:09 pm, eclipsed4utoo  wrote:
> Here is a screenshot right before make the request.
>
> http://yfrog.com/8d10142009115958amp
>
> You can see that there is only the "Content-Type" header.  But you can
> also see that the ContentLength is set(to 6...length of my status
> update).
>
> .Net doesn't allow me to add the header manually if the object has a
> property for that header.
>
> Ryan
>
> On Oct 14, 12:05 pm, ryan alford  wrote:
>
>
>
> > Another question is, what has changed?  This code has been working fine
> > since September 24th(sending the ContentLength).  Then on October 11th, I
> > start having issues.
> > Ryan
>
> > On Wed, Oct 14, 2009 at 11:58 AM, ryan alford 
> > wrote:
>
> > > Other code uses this snippet also.
> > > Now this is even more hilarious.  I am testing right now.  I am sending 
> > > the
> > > ContentLength no matter what.
>
> > > I now can't post status updates again.  If I give it the ContentLength, it
> > > just hangs.  If I don't give it the ContentLength, I get the error.
>
> > > If I give it the ContentLength, I can send Direct Messages(length = 0).  
> > > If
> > > I don't give it the ContentLength, I get the same error with direct
> > > messages.
>
> > > When I view the request header, the only header there is the
> > > "Content-Type".
>
> > > Ryan
>
> > > On Wed, Oct 14, 2009 at 11:26 AM, Chad Etzel  wrote:
>
> > >> On Wed, Oct 14, 2009 at 11:17 AM, ryan alford 
> > >> wrote:
> > >> > Here is the code...
> > >> >http://pastebin.com/m7ea04ea2
> > >> > Last night, that code worked(with the content length being commented
> > >> out).
> > >> >  This morning, it gives me the "length required" error.
> > >> > Ryan
>
> > >> I am not extremely familiar with C#, but you might want to run a trace
> > >> to see what exactly the HTTP request headers are that you are sending.
> > >> Are you calling this code only for posting an update? Or are there
> > >> other methods using this code as well?  I know for requests like
> > >> friendship/create you have to set the content-length to 0 for the
> > >> request to work if you specify the username in the URL...
>
> > >> -Chad
>
> > >> > On Wed, Oct 14, 2009 at 11:09 AM, Chad Etzel  wrote:
>
> > >> >> Can you post your code snippet (in something like pastie or pastebin)?
> > >> >> Content-length should almost always be required for POSTs (from HTTP
> > >> >> spec).
>
> > >> >> -Chad
>
> > >> >> On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo <
> > >> ryanalford...@gmail.com>
> > >> >> wrote:
>
> > >> >> > Ok, this is really starting to screw with me.  On Sunday, I received
> > >> >> > this error.  I put in code to send the content length when making a
> > >> >> > status update.  It worked on Sunday.  On Monday, the POST request
> > >> >> > started hanging.  For two days, I tried to figure out what the
> > >> problem
> > >> >> > was.  So last night, I removed the code to add the content length.
> > >>  IT
> > >> >> > WORKED!!!
>
> > >> >> > Now, this morning, I am getting the error again that the length is
> > >> >> > required.
>
> > >> >> > So which is it?  Is the length required or not?  Last night it was
> > >> not
> > >> >> > required, this morning it is.  If I send it and it's not required, 
> > >> >> > it
> > >> >> > hangs the request indefinitely.  If I don't send it and it's
> > >> required,
> > >> >> > I get an error message.
>
> > >> >> > Any help?


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread eclipsed4utoo

Here is a screenshot right before make the request.

http://yfrog.com/8d10142009115958amp

You can see that there is only the "Content-Type" header.  But you can
also see that the ContentLength is set(to 6...length of my status
update).

.Net doesn't allow me to add the header manually if the object has a
property for that header.

Ryan

On Oct 14, 12:05 pm, ryan alford  wrote:
> Another question is, what has changed?  This code has been working fine
> since September 24th(sending the ContentLength).  Then on October 11th, I
> start having issues.
> Ryan
>
> On Wed, Oct 14, 2009 at 11:58 AM, ryan alford wrote:
>
>
>
> > Other code uses this snippet also.
> > Now this is even more hilarious.  I am testing right now.  I am sending the
> > ContentLength no matter what.
>
> > I now can't post status updates again.  If I give it the ContentLength, it
> > just hangs.  If I don't give it the ContentLength, I get the error.
>
> > If I give it the ContentLength, I can send Direct Messages(length = 0).  If
> > I don't give it the ContentLength, I get the same error with direct
> > messages.
>
> > When I view the request header, the only header there is the
> > "Content-Type".
>
> > Ryan
>
> > On Wed, Oct 14, 2009 at 11:26 AM, Chad Etzel  wrote:
>
> >> On Wed, Oct 14, 2009 at 11:17 AM, ryan alford 
> >> wrote:
> >> > Here is the code...
> >> >http://pastebin.com/m7ea04ea2
> >> > Last night, that code worked(with the content length being commented
> >> out).
> >> >  This morning, it gives me the "length required" error.
> >> > Ryan
>
> >> I am not extremely familiar with C#, but you might want to run a trace
> >> to see what exactly the HTTP request headers are that you are sending.
> >> Are you calling this code only for posting an update? Or are there
> >> other methods using this code as well?  I know for requests like
> >> friendship/create you have to set the content-length to 0 for the
> >> request to work if you specify the username in the URL...
>
> >> -Chad
>
> >> > On Wed, Oct 14, 2009 at 11:09 AM, Chad Etzel  wrote:
>
> >> >> Can you post your code snippet (in something like pastie or pastebin)?
> >> >> Content-length should almost always be required for POSTs (from HTTP
> >> >> spec).
>
> >> >> -Chad
>
> >> >> On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo <
> >> ryanalford...@gmail.com>
> >> >> wrote:
>
> >> >> > Ok, this is really starting to screw with me.  On Sunday, I received
> >> >> > this error.  I put in code to send the content length when making a
> >> >> > status update.  It worked on Sunday.  On Monday, the POST request
> >> >> > started hanging.  For two days, I tried to figure out what the
> >> problem
> >> >> > was.  So last night, I removed the code to add the content length.
> >>  IT
> >> >> > WORKED!!!
>
> >> >> > Now, this morning, I am getting the error again that the length is
> >> >> > required.
>
> >> >> > So which is it?  Is the length required or not?  Last night it was
> >> not
> >> >> > required, this morning it is.  If I send it and it's not required, it
> >> >> > hangs the request indefinitely.  If I don't send it and it's
> >> required,
> >> >> > I get an error message.
>
> >> >> > Any help?


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread ryan alford
Another question is, what has changed?  This code has been working fine
since September 24th(sending the ContentLength).  Then on October 11th, I
start having issues.
Ryan

On Wed, Oct 14, 2009 at 11:58 AM, ryan alford wrote:

> Other code uses this snippet also.
> Now this is even more hilarious.  I am testing right now.  I am sending the
> ContentLength no matter what.
>
> I now can't post status updates again.  If I give it the ContentLength, it
> just hangs.  If I don't give it the ContentLength, I get the error.
>
> If I give it the ContentLength, I can send Direct Messages(length = 0).  If
> I don't give it the ContentLength, I get the same error with direct
> messages.
>
> When I view the request header, the only header there is the
> "Content-Type".
>
> Ryan
>
>
> On Wed, Oct 14, 2009 at 11:26 AM, Chad Etzel  wrote:
>
>>
>> On Wed, Oct 14, 2009 at 11:17 AM, ryan alford 
>> wrote:
>> > Here is the code...
>> > http://pastebin.com/m7ea04ea2
>> > Last night, that code worked(with the content length being commented
>> out).
>> >  This morning, it gives me the "length required" error.
>> > Ryan
>>
>> I am not extremely familiar with C#, but you might want to run a trace
>> to see what exactly the HTTP request headers are that you are sending.
>> Are you calling this code only for posting an update? Or are there
>> other methods using this code as well?  I know for requests like
>> friendship/create you have to set the content-length to 0 for the
>> request to work if you specify the username in the URL...
>>
>> -Chad
>>
>>
>> >
>> > On Wed, Oct 14, 2009 at 11:09 AM, Chad Etzel  wrote:
>> >>
>> >> Can you post your code snippet (in something like pastie or pastebin)?
>> >> Content-length should almost always be required for POSTs (from HTTP
>> >> spec).
>> >>
>> >> -Chad
>> >>
>> >> On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo <
>> ryanalford...@gmail.com>
>> >> wrote:
>> >> >
>> >> > Ok, this is really starting to screw with me.  On Sunday, I received
>> >> > this error.  I put in code to send the content length when making a
>> >> > status update.  It worked on Sunday.  On Monday, the POST request
>> >> > started hanging.  For two days, I tried to figure out what the
>> problem
>> >> > was.  So last night, I removed the code to add the content length.
>>  IT
>> >> > WORKED!!!
>> >> >
>> >> > Now, this morning, I am getting the error again that the length is
>> >> > required.
>> >> >
>> >> > So which is it?  Is the length required or not?  Last night it was
>> not
>> >> > required, this morning it is.  If I send it and it's not required, it
>> >> > hangs the request indefinitely.  If I don't send it and it's
>> required,
>> >> > I get an error message.
>> >> >
>> >> > Any help?
>> >> >
>> >
>> >
>>
>
>


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread Chad Etzel

Is there some sort of request.toString() method that will dump the
actual request that is being sent? Or is that what you see is only the
Content-Type?
-chad

On Wed, Oct 14, 2009 at 11:58 AM, ryan alford  wrote:
> Other code uses this snippet also.
> Now this is even more hilarious.  I am testing right now.  I am sending the
> ContentLength no matter what.
> I now can't post status updates again.  If I give it the ContentLength, it
> just hangs.  If I don't give it the ContentLength, I get the error.
> If I give it the ContentLength, I can send Direct Messages(length = 0).  If
> I don't give it the ContentLength, I get the same error with direct
> messages.
> When I view the request header, the only header there is the "Content-Type".
> Ryan
>
> On Wed, Oct 14, 2009 at 11:26 AM, Chad Etzel  wrote:
>>
>> On Wed, Oct 14, 2009 at 11:17 AM, ryan alford 
>> wrote:
>> > Here is the code...
>> > http://pastebin.com/m7ea04ea2
>> > Last night, that code worked(with the content length being commented
>> > out).
>> >  This morning, it gives me the "length required" error.
>> > Ryan
>>
>> I am not extremely familiar with C#, but you might want to run a trace
>> to see what exactly the HTTP request headers are that you are sending.
>> Are you calling this code only for posting an update? Or are there
>> other methods using this code as well?  I know for requests like
>> friendship/create you have to set the content-length to 0 for the
>> request to work if you specify the username in the URL...
>>
>> -Chad
>>
>>
>> >
>> > On Wed, Oct 14, 2009 at 11:09 AM, Chad Etzel  wrote:
>> >>
>> >> Can you post your code snippet (in something like pastie or pastebin)?
>> >> Content-length should almost always be required for POSTs (from HTTP
>> >> spec).
>> >>
>> >> -Chad
>> >>
>> >> On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo
>> >> 
>> >> wrote:
>> >> >
>> >> > Ok, this is really starting to screw with me.  On Sunday, I received
>> >> > this error.  I put in code to send the content length when making a
>> >> > status update.  It worked on Sunday.  On Monday, the POST request
>> >> > started hanging.  For two days, I tried to figure out what the
>> >> > problem
>> >> > was.  So last night, I removed the code to add the content length.
>> >> >  IT
>> >> > WORKED!!!
>> >> >
>> >> > Now, this morning, I am getting the error again that the length is
>> >> > required.
>> >> >
>> >> > So which is it?  Is the length required or not?  Last night it was
>> >> > not
>> >> > required, this morning it is.  If I send it and it's not required, it
>> >> > hangs the request indefinitely.  If I don't send it and it's
>> >> > required,
>> >> > I get an error message.
>> >> >
>> >> > Any help?
>> >> >
>> >
>> >
>
>


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread ryan alford
Other code uses this snippet also.
Now this is even more hilarious.  I am testing right now.  I am sending the
ContentLength no matter what.

I now can't post status updates again.  If I give it the ContentLength, it
just hangs.  If I don't give it the ContentLength, I get the error.

If I give it the ContentLength, I can send Direct Messages(length = 0).  If
I don't give it the ContentLength, I get the same error with direct
messages.

When I view the request header, the only header there is the "Content-Type".

Ryan

On Wed, Oct 14, 2009 at 11:26 AM, Chad Etzel  wrote:

>
> On Wed, Oct 14, 2009 at 11:17 AM, ryan alford 
> wrote:
> > Here is the code...
> > http://pastebin.com/m7ea04ea2
> > Last night, that code worked(with the content length being commented
> out).
> >  This morning, it gives me the "length required" error.
> > Ryan
>
> I am not extremely familiar with C#, but you might want to run a trace
> to see what exactly the HTTP request headers are that you are sending.
> Are you calling this code only for posting an update? Or are there
> other methods using this code as well?  I know for requests like
> friendship/create you have to set the content-length to 0 for the
> request to work if you specify the username in the URL...
>
> -Chad
>
>
> >
> > On Wed, Oct 14, 2009 at 11:09 AM, Chad Etzel  wrote:
> >>
> >> Can you post your code snippet (in something like pastie or pastebin)?
> >> Content-length should almost always be required for POSTs (from HTTP
> >> spec).
> >>
> >> -Chad
> >>
> >> On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo  >
> >> wrote:
> >> >
> >> > Ok, this is really starting to screw with me.  On Sunday, I received
> >> > this error.  I put in code to send the content length when making a
> >> > status update.  It worked on Sunday.  On Monday, the POST request
> >> > started hanging.  For two days, I tried to figure out what the problem
> >> > was.  So last night, I removed the code to add the content length.  IT
> >> > WORKED!!!
> >> >
> >> > Now, this morning, I am getting the error again that the length is
> >> > required.
> >> >
> >> > So which is it?  Is the length required or not?  Last night it was not
> >> > required, this morning it is.  If I send it and it's not required, it
> >> > hangs the request indefinitely.  If I don't send it and it's required,
> >> > I get an error message.
> >> >
> >> > Any help?
> >> >
> >
> >
>


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread Chad Etzel

On Wed, Oct 14, 2009 at 11:17 AM, ryan alford  wrote:
> Here is the code...
> http://pastebin.com/m7ea04ea2
> Last night, that code worked(with the content length being commented out).
>  This morning, it gives me the "length required" error.
> Ryan

I am not extremely familiar with C#, but you might want to run a trace
to see what exactly the HTTP request headers are that you are sending.
Are you calling this code only for posting an update? Or are there
other methods using this code as well?  I know for requests like
friendship/create you have to set the content-length to 0 for the
request to work if you specify the username in the URL...

-Chad


>
> On Wed, Oct 14, 2009 at 11:09 AM, Chad Etzel  wrote:
>>
>> Can you post your code snippet (in something like pastie or pastebin)?
>> Content-length should almost always be required for POSTs (from HTTP
>> spec).
>>
>> -Chad
>>
>> On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo 
>> wrote:
>> >
>> > Ok, this is really starting to screw with me.  On Sunday, I received
>> > this error.  I put in code to send the content length when making a
>> > status update.  It worked on Sunday.  On Monday, the POST request
>> > started hanging.  For two days, I tried to figure out what the problem
>> > was.  So last night, I removed the code to add the content length.  IT
>> > WORKED!!!
>> >
>> > Now, this morning, I am getting the error again that the length is
>> > required.
>> >
>> > So which is it?  Is the length required or not?  Last night it was not
>> > required, this morning it is.  If I send it and it's not required, it
>> > hangs the request indefinitely.  If I don't send it and it's required,
>> > I get an error message.
>> >
>> > Any help?
>> >
>
>


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread ryan alford
Here is the code...
http://pastebin.com/m7ea04ea2

Last night, that code worked(with the content
length being commented out).  This morning, it gives me the "length
required" error.

Ryan

On Wed, Oct 14, 2009 at 11:09 AM, Chad Etzel  wrote:

>
> Can you post your code snippet (in something like pastie or pastebin)?
> Content-length should almost always be required for POSTs (from HTTP
> spec).
>
> -Chad
>
> On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo 
> wrote:
> >
> > Ok, this is really starting to screw with me.  On Sunday, I received
> > this error.  I put in code to send the content length when making a
> > status update.  It worked on Sunday.  On Monday, the POST request
> > started hanging.  For two days, I tried to figure out what the problem
> > was.  So last night, I removed the code to add the content length.  IT
> > WORKED!!!
> >
> > Now, this morning, I am getting the error again that the length is
> > required.
> >
> > So which is it?  Is the length required or not?  Last night it was not
> > required, this morning it is.  If I send it and it's not required, it
> > hangs the request indefinitely.  If I don't send it and it's required,
> > I get an error message.
> >
> > Any help?
> >
>


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread Chad Etzel

Can you post your code snippet (in something like pastie or pastebin)?
Content-length should almost always be required for POSTs (from HTTP
spec).

-Chad

On Wed, Oct 14, 2009 at 8:56 AM, eclipsed4utoo  wrote:
>
> Ok, this is really starting to screw with me.  On Sunday, I received
> this error.  I put in code to send the content length when making a
> status update.  It worked on Sunday.  On Monday, the POST request
> started hanging.  For two days, I tried to figure out what the problem
> was.  So last night, I removed the code to add the content length.  IT
> WORKED!!!
>
> Now, this morning, I am getting the error again that the length is
> required.
>
> So which is it?  Is the length required or not?  Last night it was not
> required, this morning it is.  If I send it and it's not required, it
> hangs the request indefinitely.  If I don't send it and it's required,
> I get an error message.
>
> Any help?
>


[twitter-dev] Re: (411) Length Required error

2009-10-14 Thread Dewald Pretorius

You may just be hitting different servers in the Twitter server farm,
and some of them may be setup to require length and others not to.

Dewald

On Oct 14, 9:56 am, eclipsed4utoo  wrote:
> Ok, this is really starting to screw with me.  On Sunday, I received
> this error.  I put in code to send the content length when making a
> status update.  It worked on Sunday.  On Monday, the POST request
> started hanging.  For two days, I tried to figure out what the problem
> was.  So last night, I removed the code to add the content length.  IT
> WORKED!!!
>
> Now, this morning, I am getting the error again that the length is
> required.
>
> So which is it?  Is the length required or not?  Last night it was not
> required, this morning it is.  If I send it and it's not required, it
> hangs the request indefinitely.  If I don't send it and it's required,
> I get an error message.
>
> Any help?