Skip to content

Conversation

@jukkar
Copy link
Member

@jukkar jukkar commented Nov 10, 2017

Add status error string when sending a error message from
HTTP server to client as described in RFC 2616 ch 6.1.
Previously only error code was sent except for 400 (Bad Request).

This also fixes uninitialized memory access in error message.

Coverity-CID: 178792
Fixes #4782

Signed-off-by: Jukka Rissanen [email protected]

Add status error string when sending a error message from
HTTP server to client as described in RFC 2616 ch 6.1.
Previously only error code was sent except for 400 (Bad Request).

This also fixes uninitialized memory access in error message.

Coverity-CID: 178792
Fixes zephyrproject-rtos#4782

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar
Copy link
Member Author

jukkar commented Nov 10, 2017

Some discussion about this can be found in #4818 but as this fix is more than just a coverity fix, I separated the patch.

@jukkar jukkar mentioned this pull request Nov 13, 2017
Copy link
Contributor

@pfalcon pfalcon left a comment

Choose a reason for hiding this comment

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

Looks good. Not sure if we could have internal static array of descriptions, or maybe just static "N/A" as such, instead of letting to pass an arbitrary one, but that's definitely the most flexible way.

Copy link
Contributor

@mike-scott mike-scott left a comment

Choose a reason for hiding this comment

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

LGTM

@jukkar jukkar merged commit 7784518 into zephyrproject-rtos:master Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Coverity CID: 178792] Memory - illegal accesses in /subsys/net/lib/http/http_app_server.c

3 participants