Skip to content

sol#236

Open
Skay9n wants to merge 2 commits intomate-academy:masterfrom
Skay9n:develop
Open

sol#236
Skay9n wants to merge 2 commits intomate-academy:masterfrom
Skay9n:develop

Conversation

@Skay9n
Copy link
Copy Markdown

@Skay9n Skay9n commented May 6, 2026

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

The implementation has a critical typo that prevents the form from working correctly. In src/index.html on line 13, the select field has name="comprassionType" (double 's'), but the server in src/createServer.js expects fields.compressionType (single 's'). This mismatch means fields.compressionType will always be undefined on the server side, causing the validation to fail with a 400 error for every form submission—even when all other values are correct.

The fix is straightforward: Change the name attribute in the select element from comprassionType to compressionType to match what the server expects.

Note: The server implementation in createServer.js is solid and correctly implements all requirements (Streams, zlib module, proper status codes, error handling). Only the HTML form's attribute name needs correction.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/createServer.js
// Return instance of http.Server class
return http.createServer((req, res) => {
if (req.url === '/') {
res.statusCode = 200;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: comprassionType should be compressionType (with double 's'). The server code on line 45 expects fields.compressionType, so this mismatch will cause the form validation to always fail.

Comment thread src/index.html Outdated
<input type="file" name="file">

<!-- 2. випадаючий список -->
<select name="comprassionType">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the name attribute: 'comprassionType' should be 'compressionType' to match what the server expects in fields.compressionType

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Your implementation is approved and meets all task requirements. The critical typo from the previous review has been successfully fixed - the select field in src/index.html now correctly uses name="compressionType" which matches what the server expects. Both the HTML form and server are fully functional: the form provides proper file selection, compression type options (gzip, deflate, br), and correct submission attributes; the server correctly handles validation, uses Streams with zlib, and returns appropriate status codes for all scenarios (200 for success, 400 for invalid requests, 404 for non-existent endpoints). All checklist items pass and your solution is ready for testing.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants