http.post problems with base64 encoded data

Discussion in 'Ruby' started by Randy Lawrence, Jul 4, 2004.

  1. 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
    }
     
    Randy Lawrence, Jul 4, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. T

    decode base64 encoded login info

    Mr. T, Mar 5, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    537
    Patrice
    Mar 5, 2007
  2. Phil C.
    Replies:
    2
    Views:
    500
    Phil C.
    Jul 19, 2005
  3. Mr. T

    decode base64 encoded login info

    Mr. T, Mar 5, 2007, in forum: ASP .Net Security
    Replies:
    0
    Views:
    187
    Mr. T
    Mar 5, 2007
  4. Michael

    Base64-Encoded URL in ASP

    Michael, Feb 23, 2004, in forum: ASP General
    Replies:
    1
    Views:
    343
    Chris Barber
    Feb 24, 2004
  5. Randy Lawrence
    Replies:
    2
    Views:
    266
    Randy Lawrence
    Jul 4, 2004
Loading...

Share This Page