Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Braintree sandbox (and probably prod eventually) no longer return "Content- #43

Open
jwrightecs opened this issue Nov 11, 2024 · 1 comment

Comments

@jwrightecs
Copy link

No description provided.

@jwrightecs
Copy link
Author

In this block in WebService/Braintree/HTTP.pm (make_request)fails when the braintree API fails to send Content-Length:

    if ($response->header('Content-Length') > 1) {
        return xml_to_hash($response->content);
    } else {
        return {http_status => $response->code};
    }

replacing it with the following seems to work

    if (length($response->content) > 1 ||  $response->header('Content-Length') > 1) {
        return xml_to_hash($response->content);
    } else {
        return {http_status => $response->code};
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant