Skip to content
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

Fix issues in http_server #1370

Merged
merged 1 commit into from
Nov 23, 2024
Merged

Conversation

pguyot
Copy link
Collaborator

@pguyot pguyot commented Nov 19, 2024

  • Fix a bug where http_server would fail to send a reply with integers.
  • Fix another bug where http_server crashed with badmatch if connection was closed, including because of previous bug.
  • Also fix socket_driver to return {gen_tcp, closed} when socket is closed on Linux instead of {gen_tcp, {recv, 104}}

Fixes #1366

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@pguyot pguyot force-pushed the w47/http-server-fixes branch from f35074b to 6383166 Compare November 19, 2024 22:15
@petermm
Copy link
Contributor

petermm commented Nov 20, 2024

confirmed working on esp32, using system_info_server.erl (which crashes /system/info on 0.6.5 release).

Would like to see this in 0.6 branch, but either way🎉

Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

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

I would keep adding fixes on top of release-0.6 and mention this fix on the changelog.
I will merge release-0.6 into main as soon as we merge this PR.

@pguyot pguyot force-pushed the w47/http-server-fixes branch 2 times, most recently from 0af4948 to a6161b4 Compare November 22, 2024 07:06
@pguyot pguyot changed the base branch from main to release-0.6 November 22, 2024 07:06
@pguyot pguyot requested a review from bettio November 22, 2024 07:07
Fix a bug where http_server would fail to send a reply with integers.
Fix another  bug where http_server crashed with badmatch if connection was
closed, including because of previous bug.
Also fix socket_driver to return `{gen_tcp, closed}` when socket is closed on
Linux instead of `{gen_tcp, {recv, 104}}`

Fixes atomvm#1366

Signed-off-by: Paul Guyot <[email protected]>
@pguyot pguyot force-pushed the w47/http-server-fixes branch from a6161b4 to 652c074 Compare November 22, 2024 18:44
@bettio bettio merged commit bdfea6d into atomvm:release-0.6 Nov 23, 2024
74 checks passed
@pguyot pguyot deleted the w47/http-server-fixes branch November 23, 2024 14:56
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.

http_server closes connection when sent list contains an integer
3 participants