Skip to content

Commit 1cb41f2

Browse files
authored
Merge pull request #50 from IntegerAlex/sendfile
Version 0.6
2 parents 06b9ba8 + ee0f191 commit 1cb41f2

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Changelog
22

33
All notable changes to this project will be documented in this file.
4+
## [0.6.0] - 2024-10-09
5+
### Fixed
6+
- HTTPParserError: Response does not match the HTTP/1.1 protocol (Invalid header value char)
7+
- The issue was due to using `\n` instead of `\r\n` to terminate header lines. Each header should end with `\r\n` for proper protocol compliance.
8+
9+
10+
### Added
11+
- Added `sendFile()` method to send files as response.
12+
- Added `server.close()` This method has been implemented to explicitly close the server when necessary.
13+
- Added mime-types library to handle content-type for files.
14+
415
## [0.5.6] - 2024-10-05
516
### Fixed
617
- Fixed the issue of POST requests containing BODY data not being parsed correctly.

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,9 @@ If you would like to contribute to Hasty Server, you're welcome to:
8484
Note: Do not use third-party code or dependencies. You can take help from language models, but avoid directly copying any of their code.
8585

8686
### CHANGELOG
87-
88-
It now Supports: PUT & DELETE HTTP methods and chaining of response methods.
89-
90-
`res.status(200).send('Hello World')`
91-
87+
- v0.6.0
88+
- Added `sendFile()` method to send static files.
89+
- Added `server.close()` method to close the server explicitly.
9290

9391
For more information, see .
9492
[CHANGELOG](CHANGELOG.md)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hasty-server",
3-
"version": "0.5.6",
3+
"version": "0.6.0",
44
"main": "./server/index.js",
55
"directories": {
66
"lib": "lib",

0 commit comments

Comments
 (0)