fixed bug reported by Kai Hillmann

This commit is contained in:
Olaf Bergmann committed 2011-12-27 17:44:51 +01:00
1 parent 298ad4fffa
commit 08c59ab23f
1 file changed
+12 -2
+12 -2
View File
@@ -67,8 +67,9 @@ coap_split_uri(unsigned char *str_var, size_t len, coap_uri_t *uri) {
}
/* There might be an additional 's', indicating the secure version: */
if ( len && (secure = tolower(*p) == 's') )
++p;
if (len && (secure = tolower(*p) == 's')) {
++p; --len;
}
q = (unsigned char *)"://";
while (len && *q && tolower(*p) == *q) {
@@ -152,6 +153,15 @@ coap_split_uri(unsigned char *str_var, size_t len, coap_uri_t *uri) {
}
/* Uri_Query */
/* FIXME: split at & sign, parse:
query-pattern = search-token [ "*" ]
search-token = *search-char
search-char = unreserved / pct-encoded
/ ":" / "@" ; from pchar
/ "/" / "?" ; from query
/ "!" / "$" / "'" / "(" / ")"
/ "+" / "," / ";" / "=" ; from sub-delims
*/
if (len && *p == '?') {
++p;
--len;