从S3开始状态为200后,jquery ajax调用未执行成功函数

时间:2015-09-18 15:59:20

标签: javascript jquery ajax amazon-s3

我奇怪地注意到ajax调用从不执行成功函数事件它HttpStatus是200但它执行错误函数。 http标题是不是正确的,这是从S3回复的?

    downloadBlob: function(assetid, blobid, url, success, error){
        var that = this, 
        img(url, function(){alert("Succes")}, error);
},

...

    img: function(url, success, error){
        $.ajax({
            url: url,
            type: "GET",
            dataType: "blob",
            success: success,
            error: error,
        })

S3 HTTP

Remote Address:
54.239.172.104:80
Request URL:
http://dxxxxxxxxx.cloudfront.net/e7fb1b03-6d0xxxxxxxxxx4cb5464_t.jpg?Expires=1479162000&Signature=xxxxxxxxx&Key-Pair-Id=xxxxxxxxxxxxx
Request Method:
GET
Status Code:
200 OK
Response Headersview source
Accept-Ranges:
bytes
Access-Control-Allow-Methods:
GET, PUT, POST, DELETE
Access-Control-Allow-Origin:
*
Access-Control-Max-Age:
3000
Age:
1343
Connection:
keep-alive
Content-Length:
2662
Content-Type:
image/jpeg
Date:
Fri, 18 Sep 2015 15:23:53 GMT
ETag:
“xxxxxxxxxxx"
Last-Modified:
Fri, 18 Sep 2015 15:18:05 GMT
Server:
AmazonS3
Via:
1.1 xxxxxxxxxx.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
1xxxxxxxxxxxxxx
x-amz-meta-attr:
{"st_ctime": 1442607482.0, "st_mtime": 1442607483.0, "st_nlink": 1, "st_mode": 33188, "st_size": 2662, "st_gid": 20, "st_uid": 501, "st_atime": 1442607483.0}
x-amz-version-id:
xxxxxxxxxxxwfVlNW
X-Cache:
Hit from cloudfront
Request Headersview source
Accept:
*/*
Accept-Encoding:
gzip, deflate, sdch
Accept-Language:
en-US,en;q=0.8
Cache-Control:
no-cache
Connection:
keep-alive
Host:
dxxxxxxxx.cloudfront.net
Origin:
http://localhost:9000
Pragma:
no-cache
Referer:
http://localhost:9000/debug.html
User-Agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36
Query String Parametersview sourceview URL encoded
Expires:
1479162000
Signature:
xxxxxxxxxxxxxgFNqSd1K2A__
Key-Pair-Id:
xxxxxxxxxxxxxxxxA

0 个答案:

没有答案