-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
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
test: test requests with Unicode in the URL #13297
Conversation
This test currently fails. It illustrates that Unicode in the URL does not arrive intact to the server, there is silent data corruption along the way at some point. This test is for the issue nodejs#13296.
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
// USE OR OTHER DEALINGS IN THE SOFTWARE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New files do not need the copyright header at the top
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
'Sanity check that string literal produced the expected string' | ||
); | ||
|
||
const server = http.Server(function(req, res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http.createServer()
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
const server = http.Server(function(req, res) { | ||
result = req.url; | ||
req.on('data', function() { | ||
}).on('end', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be wrapped in common.mustCall()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
path: expected, | ||
method: 'GET' | ||
}, function(res) { | ||
console.log(res.statusCode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please omit the extraneous console output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
}).end(); | ||
}); | ||
|
||
process.on('exit', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If using common.mustCall()
and inline asserts, there's no need for an exit handler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this test would be expected to fail with an issue that has not yet been solved, it should be moved into the test/known_issues
directory instead of parallel
I've moved the test to |
Thank you @Flimm ... moving the test to known_issues is particularly useful as those are actually run in CI with the expectation that they will fail. That way, if they end up getting fixed somehow, we'll know right away. As for the style of the other tests, we've been slowly and incrementally updating all of the existing tests. |
This test currently fails. It illustrates that Unicode in the URL does not arrive intact to the server, there is silent data corruption along the way at some point. This test is for the issue #13296. PR-URL: #13297 Reviewed-By: James M Snell <[email protected]>
Landed in 592d7d2 |
This test currently fails. It illustrates that Unicode in the URL does not arrive intact to the server, there is silent data corruption along the way at some point. This test is for the issue #13296. PR-URL: #13297 Reviewed-By: James M Snell <[email protected]>
This test currently fails. It illustrates that Unicode in the URL does not arrive intact to the server, there is silent data corruption along the way at some point. This test is for the issue #13296. PR-URL: #13297 Reviewed-By: James M Snell <[email protected]>
This test currently fails. It illustrates that Unicode in the URL does
not arrive intact to the server, there is silent data corruption along
the way at some point.
This test is for the issue #13296.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes (this doesn't pass, as the test is only an illustration for a bug)Affected core subsystem(s)
http