• 
      

    Add middleware for turning relative URL redirects into absolute URLs.

    Review Request #10256 — Created Oct. 21, 2018 and submitted

    Information

    Djblets
    release-2.0.x
    ae0e0a7...

    Reviewers

    Django 1.9 changed the behavior of URL redirects to always make them
    relative if pointing to the same host. In theory, this is against RFCs
    and can break some HTTP implementations out there, but in practice the
    only real problem for us is that it makes it much harder to write unit
    tests that cover 1.9+ and pre-1.9 versions of Django.

    This change introduces AbsoluteURLRedirectMiddleware, which will turn
    those relative URLs back into absolute URLs, giving us the legacy
    behavior. Sites/applications can use this until they're fully ready to
    adopt the newer behavior of URL redirects.

    Tested this with Review Board. Verified the URLs were coming back as
    absolute in all cases.

    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (a6b1584)