Skip to content

Print announce error response#11878

Merged
SmallJoker merged 6 commits into
luanti-org:masterfrom
ShadowNinja:print-announce-error-response
Jan 1, 2022
Merged

Print announce error response#11878
SmallJoker merged 6 commits into
luanti-org:masterfrom
ShadowNinja:print-announce-error-response

Conversation

@ShadowNinja

Copy link
Copy Markdown
Contributor

This it just the HTTPFetch changes from #11342.

Note that this does make one change to HTTP Fetch that would be visible to the Lua API: HTTP responses with a 400+ code don't cause succeeded to be set to false anymore, only an actual cURL failure (e.g. connection refused) will cause that. lua_api.txt doesn't define what precisely succeeded means, though, so either implementation could be correct. It could be restored to the previous behavior or we could leave it if this implementation makes more sense (to me it seems like it makes more sense this way, because the request itself succeeded, the server just responded with a failure code).

Comment thread src/httpfetch.cpp Outdated
Comment thread src/httpfetch.h

@sfan5 sfan5 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM otherwise

Comment thread src/util/string.cpp Outdated
Comment thread src/httpfetch.h
@SmallJoker SmallJoker merged commit 29d2b2c into luanti-org:master Jan 1, 2022
@ShadowNinja ShadowNinja deleted the print-announce-error-response branch January 3, 2022 01:58
LoneWolfBT pushed a commit to MT-CTF/minetest that referenced this pull request Feb 13, 2022
Fix HTTPFetch caller and request ID to 64 bits
Check that allocated caller ID is not DISCARD
Print body if serverlist request returns error
Don't print control characters from HTTP responses
Document special HTTPFetch caller IDs
Allow unicode to be printed
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.

3 participants