Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > problems with base64 encoded data

Thread Tools problems with base64 encoded data

Randy Lawrence
Posts: n/a
I can do using simple variable values but I'm having some
problems with using base64 encoded data.

For example, if I set 'somedata' to a simple string, the following code
works. But if I take more complex data (like rsa signature) and encode
it using Base64.encode64(somedata), I get a "permission denied" web
server message.

I'm wondering if this is caused by base64-encoded data resulting in some
'=' characters and if so, how do I work around this?


require 'net/http'
require 'base64'

somedata = 'hello'
#somedata = Base64.encode64('%FYG#&*^G#uyg6t76gkjhkjhf*...')

Net::HTTP.start( '', 80 ) {|http|
response = '/ruby/changeip.rbx',
"foo=#{somedata}" )
puts response.body
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
decode base64 encoded login info Mr. T ASP .Net 1 03-05-2007 03:47 PM
decode base64 encoded login info Mr. T ASP .Net Security 0 03-05-2007 03:16 PM
Encrypting/Decrypting Base64 encoded Aes Key with Dpapi Problem Phil C. ASP .Net Security 2 07-19-2005 08:57 PM problem only when using base64-encoded data Randy Lawrence Ruby 2 07-04-2004 08:41 PM
Base64-Encoded URL in ASP Michael ASP General 1 02-24-2004 12:43 AM