R
Randy Lawrence
I can do http.post using simple variable values but I'm having some
problems with http.post 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( 'www.innerveil.com', 80 ) {|http|
response = http.post( '/ruby/changeip.rbx',
"foo=#{somedata}" )
puts response.body
}
problems with http.post 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( 'www.innerveil.com', 80 ) {|http|
response = http.post( '/ruby/changeip.rbx',
"foo=#{somedata}" )
puts response.body
}