GithubHelp home page GithubHelp logo

savon-multipart's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

savon-multipart's Issues

Savon::SOAP::Fault doesn't support multipart

Currently I am using this workaround, but I think there should be a better way to fix this.

module Savon
  module SOAP
    class Response
      def soap_fault
        @soap_fault ||= Fault.new(HTTPI::Response.new(http.code, http.headers, to_xml))
      end
    end
  end
end

Response decoding typo?

The following is the current state of Savon::Soap::Response#to_xml:

  # Overwrite to work with multipart response.
  def to_xml
    if multipart?
      parts.first.body.encoded # we just assume the first part is the XML
    else
      http.body
    end
  end

It seems that "parts.first.body.encoded" is a typo and should be "parts.first.body.decoded" instead. This is the only way I could get it to work properly.

Improve detection of multipart responses

Cloned from Savon issue 682. savonrb/savon#682

pulling from https://github.com/savonrb/savon-multipart/blob/master/spec/savon/soap/response_spec.rb#L9

I created this that forced the response into a multipart class, which worked.

globals = {
      :multipart => true,
      :raise_errors => true,
      :convert_response_tags_to  => lambda { |tag| tag.snakecase.to_sym}
 }

response = Savon::Multipart::Response.new(response.http, globals, {})
response.hash
Any ideas why this doesn't happen automatically, or if I'm missing something?

Thanks!

A good workaround might be to consider an option that just allows the user to force the response to be parsed as multipart, or possibly improving the regex to allow for more varied types of multipart headers.

Latest master compatible with savon2?

I'm confused with the Readme saying "use branch 'savon2' with when running savon >= 2.0 ". I just did, but it didn't work with latest savon version (as of gemspec dependencu on savon 2.1).

Instead latest savon-multipart gem just worked fine with latest savon

So is Readme outdated and the note about savon 2 should be removed??

Rails 6 support?

I am updating Rails 5 app to Rails 6 and facing gems versions conflicts:

Bundler could not find compatible versions for gem "mail":
  In snapshot (Gemfile.lock):
    mail (= 2.7.1)

  In Gemfile:
    rails (= 6.1.4) was resolved to 6.1.4, which depends on
      actionmailbox (= 6.1.4) was resolved to 6.1.4, which depends on
        mail (>= 2.7.1)

    savon-multipart (= 2.1.1) was resolved to 2.1.1, which depends on
      mail (~> 2.5.4)

Any advice? This gem has no updates for 2 years. Does savon still need it or maybe it support multipart messages without this gem now?

CI: Need a replacement

In order to make things more responsive, I propose we pick a new CI.

Perhaps GitHub Actions?

New release on Rubygem?

Hello,

I'm interested in the changes introduced by #17 & #20, the last release on rubygem doesn't have them.

Could you please make a new release on rubygem?

Thank you

mail gen dependency

Please allow more flexible dependency than :
s.add_dependency "mail", "2.5.3"

Not working with newest Savon version?

Hello,

I work with this gem sind over a year and it works great.

But after I updated Savon from 2.12.1 to 2.13.1, it is not working anymore.
I got in the XML only:

<xop:Include xmlns:xop=\"http://www.w3.org/2004/08/xop/include\" href=\"cid:[email protected]\"/>

I use the master branch of this gem (It was because of some problems last year, maybe I will try the newest version).

But is this an issue with my code or the savon version?

Support for Sekken?

No one has asked for multipart support in Sekken, but it might be interesting to consider adding it as a core function.

Binary parts corrupted

Currently the \n char gets replaced with \r\n in binary parts:

My current workaround is:

module Mail
  class Message
    # Avoids calling {String#to_crlf} on binary parts.
    def raw_source=(value)
      if value.include?("Content-Transfer-Encoding: binary")
        @raw_source = value
      else
        @raw_source = value.to_crlf
      end
    end
  end
end

You can reproduce this with a PDF:

--uuid:f2520735-6098-4586-93f3-019733fc1404+id=4
Content-ID: <http://tempuri.org/1/634746078367623835>
Content-Transfer-Encoding: binary
Content-Type: application/octet-stream

%PDF-1.3
....

Should I open a ticket for the mail gem?

multipart requests?

Hello,
this gem is only for multipart responses rigth? any hint for doing multipart requests?

thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.