Gzipped ajax 请求未在 Safari 但 Chrome/FF 上解压缩,
例如,我在 Safari 和 Chrome 的 Javascript 控制台中测试了以下代码:
$.post("http://onlinehotel.pro/src/proxyapi.aspx",{ttype:"read",
model:"HOTEL",
find:'{"filter":[{"property":"ID","value":"7472","compare":"="}],"sort":[],"parameters":[],"limit":1,"fields":[{"name":"NAME","type":"nvarchar","caption":"Name","index":0},{"name":"REGIONID","lookupCaption":"REGION","lookupTable":"REGION","lookupPrimaryKey":"ID","caption":"Region","type":"int"},{"name":"RES_ASKCOUNTRY","type":"bit","caption":"Ask Country","index":888},{"name":"RES_ASKCITY","type":"bit","caption":"Ask City","index":890},{"name":"RES_ASKREGION","type":"bit","caption":"Ask Region","index":892},{"name":"RES_ASKADDRESS","type":"bit","caption":"Ask Address","index":894},{"name":"RES_ASKGENDER","type":"bit","caption":"Ask Gender","index":896},{"name":"RES_ASKNATIONALITY","type":"bit","caption":"Ask Nationality","index":898},{"name":"RES_USEAMEX","type":"bit","caption":"Accept Amex","index":900},{"name":"RES_USEMASTERCARD","type":"bit","caption":"Accept MasterCard","index":902},{"name":"RES_USEVISA","type":"bit","caption":"Accept Visa","index":904},{"name":"RES_NOROOMLEFTCOUNT","type":"smallint","caption":"Sell room quota","index":906},{"name":"RES_GUESTCARDHOLDER","type":"bit","caption":"Guest must cardholder?","index":908},{"name":"RES_MAXADULTCOUNT","type":"smallint","caption":"Max Adult/Room","index":910},{"name":"RES_CHDMAXAGE","type":"smallint","caption":"Max Chd Age","index":912},{"name":"RES_CHDMINAGE","type":"smallint","caption":"Min Chd Age","index":914},{"name":"CURRENCYID","lookupCaption":"NAME","lookupTable":"STDCURCODE","lookupPrimaryKey":"ID","caption":"Default Currency","type":"int"},{"name":"EhosMemberId","type":"int","caption":"EhosMemberId","index":922},{"name":"PROGDATE","type":"date","caption":"Program Date","index":924},{"name":"GANALYTICSCODE","type":"nvarchar","caption":"Analytics Profile ID","index":926},{"name":"FBPAGEURL","type":"nvarchar","caption":"Facebook Page URL","index":928},{"name":"FBAPPPASSWORD","type":"nvarchar","caption":"Application Pass","index":930},{"name":"FBAPPID","type":"nvarchar","caption":"Application ID","index":932},{"name":"WEBKEY","type":"nvarchar","caption":"Web Key","index":934},{"name":"WEB","type":"nvarchar","caption":"Web","index":936},{"name":"TIMEZONEID","lookupCaption":"NAME","lookupTable":"STDTIMEZONE","lookupPrimaryKey":"ID","caption":"Time Zone","type":"int"},{"name":"SQLUSER","type":"nvarchar","caption":"SQL User","index":940},{"name":"SQLPASS","type":"nvarchar","caption":"SQL Password","index":942},{"name":"SQLIP","type":"nvarchar","caption":"SQL IP","index":944},{"name":"SQLDB","type":"nvarchar","caption":"SQL DB","index":946},{"name":"SMTPUSER","type":"nvarchar","caption":"SMTP User","index":948},{"name":"SMTPSERVER","type":"nvarchar","caption":"SMTP Server","index":950},{"name":"SMTPPASS","type":"nvarchar","caption":"SMTP Password","index":952},{"name":"SMTPFROM","type":"nvarchar","caption":"SMTP From","index":954},{"name":"PHONE","type":"nvarchar","caption":"Phone","index":958},{"name":"NOTES","type":"nvarchar","caption":"Notes","index":960},{"name":"MINPRICE","type":"money","caption":"Min Price","index":964},{"name":"LOGOURL","type":"nvarchar","caption":"Logo URL","index":966},{"name":"LATLNG","type":"nvarchar","caption":"Coordinate","index":968},{"name":"FAX","type":"nvarchar","caption":"Fax","index":972},{"name":"EMAIL","type":"nvarchar","caption":"Email","index":974},{"name":"CONCEPTID","lookupCaption":"CONCEPTNAME","lookupTable":"HOTEL_CONCEPT","lookupPrimaryKey":"ID","caption":"Concept","type":"int"},{"name":"CATEGORYID","lookupCaption":"CATEGORYNAME","lookupTable":"HOTEL_CATEGORY","lookupPrimaryKey":"ID","caption":"Category","type":"int"},{"name":"ADDRESS","type":"nvarchar","caption":"Address","index":986},{"name":"LAST_SYNC","type":"datetime","caption":"Last Synced","index":988},{"name":"ID","type":"int","index":990}],"idProperty":"ID"}'})
在 Chrome 中的结果:
responseText: "ERROR: Read Permission Denied"
Safari 中的结果:
responseText:"���`I�%&/m�{J�J��t��`$ؐ@�������iG#)�*��eVe]f@�흼��{����{����;�N'���?\fdl��J�ɞ!���?~|?"~�G���>z��_�ы�/N?z����/���6/?}�����/_�=���/��~d?�������_�^'_~��ͫ߇>|��M�����M�S����ӧ��k��M��>������W��_�!0�ϥﻯ^��X~�އ_�~s�������W?y��8��ŗ�����������������N_��o�\�������}������{��ɷ����A��}�ó��}v�իW�/N~���:3 ���j����>�)J/_}����7�.��pg'��{��C�K�����~�7g'�O�|�v_o�ۿX<{������s����j��������Z���/_�<~���_2ў�~���3�㷿w��Ͼ{���:�}e����/ޜ}q�S_�8���xN��J>�?л����������7/��u��� }���}ti?UX��i��g����>9�y�/�M�����=�w�� ���SE�&�嫳n3ޡ�>{���_
��m�zt�nso;_o_�M��;���evՀw��ɼ"ٺ[,�����{�������;�>���w������9{��{�{��ݽ��=����=����?���l��:�e���2o�T_�89}�ƣ���T)������QspB�����|6ܽ���\_�4�}������c���o�{N� �t���)~i���[��7�����ʼn��>����/��裺�:������Ï~����
{3�"