Skip to content

Commit

Permalink
Null response from curl may be understood as an error
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 11, 2024
1 parent 16be7d4 commit 379fbba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libr/socket/socket_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ static char *socket_http_get_recursive(const char *url, const char **headers, in
free (escaped_url);
free (command);
if (!res) {
if (code) {
*code = 404;
}
return NULL;
}
if (res) {
Expand Down Expand Up @@ -318,6 +321,9 @@ R_API char *r_socket_http_post(const char *url, const char *headers[], const cha
free (escaped_url);
free (command);
if (!res) {
if (code) {
*code = 404;
}
return NULL;
}
if (res) {
Expand Down

0 comments on commit 379fbba

Please sign in to comment.