Mike Lopke wrote:
> snacktime wrote:
>> On 8/21/06, Mike Lopke <reglopke / cableone.net> wrote:
>>> snacktime wrote:
>>> > You forgot to set the content-length header.
>>>
>>> Thanks, I tried it but I'm still getting the error.  The code works fine
>>> in 1.8.2 and I don't have to set content-length.  I think it might be
>>> something else.
>>>
>>> Would there be a reason I'd need to set this in 1.8.4 and not in 1.8.2
>>> to get http.post to work correctly?
>> 
>> Aren't dashes supposed to be escaped?  You might try escaping the post
>> data and see if that does it.
> 
> Tried it just for grins and still get the same issue.  Odd thing, It 
> doens't appear to be related to order or number of parameters.

Just an FYI for anyone else who comes uppon this, I figured out what my 
problem was.

This line:
@headers['Content-Type'] = 'text/html'

Should have been:
@headers['content-type'] = 'application/x-www-form-urlencoded'

I didn't have the content-type set correctly.  With 1.8.4 you have to 
explicitly set it.  ( This was the but and it has been fixed, from what 
I gather. )  I just was not setting it to the correct value.

Cheers,
Mike

-- 
Posted via http://www.ruby-forum.com/.