Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Nginx_upload_progress_module and jquery-1.4
- To: nginx-ru <nginx-ru@xxxxxxxxx>
- Subject: Nginx_upload_progress_module and jquery-1.4
- From: dimkalinux <dimkalinux@xxxxxxxxx>
- Date: Fri, 15 Jan 2010 10:09:39 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=4bnWSNaBs3Y4Hm1GvUqr6BCuxdZC0RhoiRVNZN4MkKU=; b=mHpt5DJyKWEA1rsic1Pf4/4EeIPGjWPZ8ACj2t8zH8P0WsPTpPOiRnepdzC4P4XdbE ue5a+gf1Z3pfbySKhXGnmqeUaylfNkqIp9XU/OyeE9l8qjsCigV+nCsOyir0nvQFz9oQ Iw9Z0+t6Hle9JjrRXFzGZeUrzNvJF21DFf2HI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=BAdDqF6IQHMsMMpWoQgqmQ4aPNbxZPoMl3PvQ6XEuNIi1UyRMxR221HaiG3hrChG5A 2aGwiQjOJud3rYgQb42Uy+6mnqj5GSwpE+fQ2Ah2yz5mVmuNbSJuXqg9HAEJkWUdlYLm LgVyugt1gQ2xK1eD8Jl1DeolF0lA5ll4eZYKE=
- Resent-date: Fri, 15 Jan 2010 13:21:25 +0300
- Resent-date: Fri, 15 Jan 2010 13:21:25 +0300
- Resent-from: Igor Sysoev <igor@xxxxxxxxx>
- Resent-message-id: <20100115102125.GI84494@xxxxxxxxxxxxx>
- Resent-to: nginx-ru@xxxxxxxxx
Вышел JQuery 1.4 и я попытался заменить им предыдущую версию 1.3.2.
Всё заработало, кроме Nginx_upload_progress_module.
AJAX запрос к модулю вызывает ошибку. В документации к JQuery указано,
что в новой версии jQuery 1.3 and earlier used JavaScript?s eval to
evaluate incoming JSON. jQuery 1.4 uses the native JSON parser if
available. It also validates incoming JSON for validity, so malformed
JSON (for instance {foo: "bar"}) will be rejected by jQuery in
jQuery.getJSON and when specifying ?json? as the dataType of an Ajax
request.
Кто знает как пропатчить модуль для выдачи корректного JSON?
Сейчас в модуле JSON генерируется так:
static ngx_str_t ngx_http_uploadprogress_json_defaults[] = {
ngx_string("{ \"state\" : \"starting\" }\r\n"),
ngx_string("{ \"state\" : \"error\", \"status\" :
$uploadprogress_status }\r\n"),
ngx_string("{ \"state\" : \"done\" }\r\n"),
ngx_string("{ \"state\" : \"uploading\", \"received\" :
$uploadprogress_received, \"size\" : $uploadprogress_length }\r\n")
};
--
dimka-linux,
Jabber: dimkalinux@xxxxxxxxx
Public key: 8B5EDD83
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|