Opened 11 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:


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

lp = location.protocol;

return (stat >= 200 && stat < 300)
stat == 304 stat == 1223

(!stat && (lp == "file:" || lp == "chrome:" || lp == "chrome-extension:" || lp == "app:" || lp == "qrc:" ) );



Change History (3)

comment:1 Changed 11 years ago by Adam Peller

Owner: changed from anonymous to James Burke

comment:2 Changed 10 years ago by Eugene Lazutkin

Component: GeneralIO
Milestone: tbd1.7
Owner: changed from James Burke to Eugene Lazutkin
Priority: normalhigh
severity: normaltrivial
Status: newassigned
Type: defectenhancement

comment:3 Changed 10 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

It was fixed in the trunk during the reorganization some time ago.

Note: See TracTickets for help on using tickets.