liip/LiipImagineBundle — pull request #216 by jaikdean (2013-08-02 16:07:01+00:00)
Title: Allow storage object responses of 301 to be accepted as OK in AmazonS3Resolver

When pushing an image to S3 using `AmazonS3Resolver` I get a response back that looks as follows (I've removed lots of unnecessary bits of data):

object(CFResponse)[266]
public 'header' =>
array (size=13)
…
public 'body' =>
object(CFSimpleXML)[292]
public 'Code' => string 'PermanentRedirect' (length=17)
public 'Message' => string 'The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.' (length=137)
public 'RequestId' => string '…' (length=16)
public 'Bucket' => string '…' (length=31)
public 'HostId' => string '…' (length=64)
public 'Endpoint' => string '…' (length=48)
public 'status' => int 301

This is then checked to see if the response was valid. However, 301 responses were being classed as invalid and the user wasn't being redirected to the asset on S3.