We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auth
When the username is empty and a password is available, the returned value of auth should align with output from Node's url module.
url
const url = require('url'); const nativeUrl = require('native-url'); url.parse('http://:[email protected]'); // { auth: ':password', ... } nativeUrl.parse('http://:[email protected]'); // { auth: ':password', ... }
const url = require('url'); const nativeUrl = require('native-url'); url.parse('http://:[email protected]'); // { auth: ':password', ... } nativeUrl.parse('http://:[email protected]'); // { auth: 'password', ... }
As described in code blocks above.
The culprit is this block, where all falsy values are filtered out.
native-url/src/parse.js
Lines 188 to 191 in 0c5aec2
I do think that this should technically be non-compliant with the spec (HTTP Basic Auth requires username to be defined) though ... ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
When the username is empty and a password is available, the returned value of
auth
should align with output from Node'surl
module.Actual Behavior
Steps to Reproduce the Problem
As described in code blocks above.
The culprit is this block, where all falsy values are filtered out.
native-url/src/parse.js
Lines 188 to 191 in 0c5aec2
I do think that this should technically be non-compliant with the spec (HTTP Basic Auth requires username to be defined) though ... ?
Specifications
The text was updated successfully, but these errors were encountered: