Comments (8)
This might be a good opportunity to just lift the url.js implementation from Node.
https://github.com/joyent/node/blob/master/lib/url.js
It's 700 lines of code, but it's fairly independent. If the runtime punycode implementation is fully Node-compatible, it should be straightforward.
from t1-runtime.
When pulling Node.js version of url it worked great. No issues when running it with colony.
Pushed those changes to my fork if you want to give it a try. AdamMagaluk@78e3d06
from t1-runtime.
Spoke too soon, seems to be breaking on test/net/http-get-query.js after running make colony
from t1-runtime.
@AdamMagaluk @tcr @johnnyman727
This looks like a RegExp bug (reference: #107). The problem line is here: https://github.com/joyent/node/blob/master/lib/url.js#L216
It should split the hostname into an array, ['api', 'openweathermap', 'org']
, but it looks like String.prototype.split isn't running with 'g' flag logic. The resulting array from the runtime is ['api', 'openweathermap.org']
. The .org
part gets stripped out as invalid later on in the function.
from t1-runtime.
Confirmed that all tests pass when using Node's url.js and including the fix in PR #110.
from t1-runtime.
Fixed with #111
from t1-runtime.
Reopening this. Added more tests for url.parse that parse local paths like /one/two/three
. I also added tests for url.format
and url.resolve
.
My guess is it's related to some of the regex replacing and matching based on some of the other issues.
Tests here: AdamMagaluk@a7c0235
from t1-runtime.
Also, not all of your tests are running due to #126.
from t1-runtime.
Related Issues (20)
- TLS: cannot provide custom `ca` list on connection HOT 2
- `undefined < 1` results in true HOT 2
- [Colony] error with absolute filepath in argument
- TLS: only DNS type subjectaltnames are supported
- net.isIP accepts hostnames that start with IP-like addresses
- TLS connection dies under ??? circumstances [even/at least under POSIX!] HOT 7
- Writing to an existing file crashes Tessel
- Cannot pass environment variables to scripts when running on mainframe HOT 1
- `Object.create(null)` instances mis-handle numeric keys
- Object.create(undefined) should throw an exception
- Buffer with too many invalid UTF-8 characters triggers abort
- Buffer.prototype.slice mishandles negative index HOT 1
- `Math.ceil` often gives wrong result on device HOT 1
- Keys are not properly coerced to strings, and non-string keys are handled improperly by hasOwnProperty
- DST-related test failure.
- 18 Tests didn't pass! HOT 8
- Date constructor doesn't handle parameters properly
- Can't run blinky example if tessel module is installed locally.
- Regexp's like \W and \1 marked as wrong
- Add Code of Conduct badge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from t1-runtime.