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 <[email protected]> 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 <[email protected]>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 <[email protected]> wrote: > > >> On Wed, Oct 14, 2009 at 11:17 AM, ryan alford <[email protected]> > >> 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 <[email protected]> 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 < > >> [email protected]> > >> >> 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?
