MobileChromeApps / chrome-app-developer-tool

Mirror of Apache Cordova app harness
Other
202 stars 33 forks source link

HarnessClient does not work for paths that contain ':' #35

Open ghost opened 9 years ago

ghost commented 9 years ago

I had a special case and was obliged to use filenames with :

Unfortunately, then, I couldn't use pushing as I was receiving following error (filenames with colon):

/usr/local/lib/node_modules/cca/node_modules/q/q.js:126
                    throw e;
                          ^
Error: Server returned status code: 500

[object Object]

    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/cca/node_modules/chrome-app-developer-tool-client/harnessclient.js:104:33)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)

Firstly, I changed this line by: path: enocodeURI(pathWithQuery),

However, then, I couldn't push for instance css files and decided to use sth like this: path: pathWithQuery.indexOf("%3A") > -1 ? encodeURI(pathWithQuery) : pathWithQuery,

and now, pushing files with : and the rest files works like a charm.

Probably, it isn't a good solution for you, however, I am pointing to the problem.

mmocny commented 9 years ago

Thanks! In case your solution is fine, why not attach a pull request as well and get your name on the contributors list?

ghost commented 9 years ago

Done. I haven't got time before. Firstly, I thought that it is too little change for a PR.