GUACAMOLE-623: Add missing documentation for URL character test.

This commit is contained in:
Michael Jumper 2018-09-10 21:08:19 -07:00
parent 371eed1f93
commit 5e3aec6df2

View File

@ -23,6 +23,17 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
/**
* Returns whether the given character is a character that need not be
* escaped when included as part of a component of a URL.
*
* @param c
* The character to test.
*
* @return
* Zero if the character does not need to be escaped when included as
* part of a component of a URL, non-zero otherwise.
*/
static int guac_kubernetes_is_url_safe(char c) { static int guac_kubernetes_is_url_safe(char c) {
return (c >= 'A' && c <= 'Z') return (c >= 'A' && c <= 'Z')
|| (c >= 'a' && c <= 'z') || (c >= 'a' && c <= 'z')