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

Fix JSONP issues #212

Closed
wants to merge 2 commits into from
Closed

Commits on Nov 6, 2015

  1. Fix issue with JSONP of errors on streamed output.

    If a callback variable was supplied for a view that errors (e.g. no
    polygons), then this led to a cacheable (200) response which contained a
    generator function (iterencode) in its _closable_objects attribute. The
    cache could not then pickle this attribute and so raised an exception.
    
    This was okay in previous versions because of a side effect of the
    smart_bytes workaround for Django bug #24240 that was in place; this
    was removed when support for Django prior to 1.8 was dropped.
    
    Fix the issue by using an identity map (as map has no close() method and
    so is not added to _closable_objects).
    dracos committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    2a30c9e View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2015

  1. Improve JSONP middleware handling.

    Don't add callback to non-JSON responses, or to responses that already
    have a callback (presumably returned from a cache).
    dracos committed Nov 10, 2015
    Configuration menu
    Copy the full SHA
    42032d3 View commit details
    Browse the repository at this point in the history