Show
Ignore:
Timestamp:
03/27/07 16:17:07 (3 years ago)
Author:
alex
Message:

adding a text/json-comment-filtered type to the IO system. Refs #2656

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/io/BrowserIO.js

    r7146 r7811  
    281281                                        ret = null; 
    282282                                } 
    283                         }else if(kwArgs.mimetype == "text/json" || kwArgs.mimetype == "application/json"){ 
     283                        }else if(kwArgs.mimetype.substr(0, 9) == "text/json" || kwArgs.mimetype.substr(0, 16) == "application/json"){ 
    284284                                try{ 
    285                                         ret = dj_eval("("+http.responseText+")"); 
     285                                        ret = dj_eval("("+kwArgs.jsonFilter(http.responseText)+")"); 
    286286                                }catch(e){ 
    287287                                        dojo.debug(e); 
     
    397397                // multi-part mime encoded and avoid using this transport for those 
    398398                // requests. 
     399                var mlc = kwArgs["mimetype"].toLowerCase()||""; 
    399400                return hasXmlHttp 
    400                         && dojo.lang.inArray(["text/plain", "text/html", "application/xml", "text/xml", "text/javascript", "text/json", "application/json"], (kwArgs["mimetype"].toLowerCase()||"")) 
     401                        && ( 
     402                                ( 
     403                                        dojo.lang.inArray([ 
     404                                                "text/plain", "text/html", "application/xml",  
     405                                                "text/xml", "text/javascript" 
     406                                                ], mlc 
     407                                        ) 
     408                                ) || ( 
     409                                        mlc.substr(0, 9) == "text/json" || mlc.substr(0, 16) == "application/json" 
     410                                ) 
     411                        ) 
    401412                        && !( kwArgs["formNode"] && dojo.io.formHasFile(kwArgs["formNode"]) ); //boolean 
    402413        }