[core,gateway] add http_status_string_format
This commit is contained in:
parent
8eec678710
commit
0f1b0cac76
@ -1242,3 +1242,10 @@ const char* http_status_string(long status)
|
||||
return "HTTP_STATUS_UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
char* http_status_string_format(long status, char* buffer, size_t size)
|
||||
{
|
||||
const char* code = http_status_string(status);
|
||||
_snprintf(buffer, size, "%s [%ld]", code, status);
|
||||
return buffer;
|
||||
}
|
||||
|
@ -142,5 +142,6 @@ FREERDP_LOCAL TRANSFER_ENCODING http_response_get_transfer_encoding(HttpResponse
|
||||
FREERDP_LOCAL BOOL http_response_is_websocket(HttpContext* http, HttpResponse* response);
|
||||
|
||||
FREERDP_LOCAL const char* http_status_string(long status);
|
||||
FREERDP_LOCAL char* http_status_string_format(long status, char* buffer, size_t size);
|
||||
|
||||
#endif /* FREERDP_LIB_CORE_GATEWAY_HTTP_H */
|
||||
|
Loading…
Reference in New Issue
Block a user