Skip to content

invalid byte sequence in UTF-8 #82

@kaisersly

Description

@kaisersly

I received this error : CASClient::BadResponseException MALFORMED CAS RESPONSE when trying to connect to my CAS server.

I presume it's the server fault but since i can't modify it i had to monkey-patch the casclient/responses.rb to make this change :

def check_and_parse_xml(raw_xml)
    raw_xml = raw_xml.encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => '?')
    ...
end

Is there a cleaner way to do it ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions