Opened 10 years ago
Closed 10 years ago
#12016 closed enhancement (fixed)
XHR does not work with Qt resource file protocol (qrc:)
Reported by: | maxmotovilov | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | IO | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Qt/WebKit? supports the qrc: protocol for loading files embedded into the executable as a Qt resource. It behaves similar to file: in respect to status codes (that is, returns 0 for success) but dojo._isDocumentOk() only supports status=0 for a specific list of protocols. I am currently using the following monkey-patch as a workaround:
<script type="text/javascript">
dojo._isDocumentOk = function(http){
var stat = http.status 0, lp = location.protocol;
return (stat >= 200 && stat < 300)
stat == 304 stat == 1223 (!stat && (lp == "file:" || lp == "chrome:" || lp == "chrome-extension:" || lp == "app:" || lp == "qrc:" ) );
}
</script>
Change History (3)
comment:1 Changed 10 years ago by
Owner: | changed from anonymous to James Burke |
---|
comment:2 Changed 10 years ago by
Component: | General → IO |
---|---|
Milestone: | tbd → 1.7 |
Owner: | changed from James Burke to Eugene Lazutkin |
Priority: | normal → high |
severity: | normal → trivial |
Status: | new → assigned |
Type: | defect → enhancement |
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
It was fixed in the trunk during the reorganization some time ago.