Browse Source

Issue #36 fixed.

Oleg Moskalenko 9 years ago
parent
commit
94f7565a92
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/apps/relay/http_server.c

+ 2 - 2
src/apps/relay/http_server.c

@@ -168,12 +168,12 @@ static struct http_request* parse_http_request_1(struct http_request* ret, char*
 				}
 
 				const char *path = evhttp_uri_get_path(uri);
-				if(path)
+				if(path && ret)
 					ret->path = strdup(path);
 
 				evhttp_uri_free(uri);
 
-				if(parse_post) {
+				if(parse_post && ret) {
 					char *body = strstr(s+1,"\r\n\r\n");
 					if(body && body[0]) {
 						if(!ret->headers) {