Browse Source

Update HTTP Daemon

master
Rafal Kupiec 6 years ago
parent
commit
79185ea0b4
1 changed files with 4 additions and 5 deletions
  1. 4
    5
      kuhttpd.c

+ 4
- 5
kuhttpd.c View File

@@ -1706,17 +1706,17 @@ static char** make_argp(void) {
char* cp2;

argp = (char**) malloc((strlen(query) + 2) * sizeof(char*));
if(argp == (char**) 0) {
return (char**) 0;
if(argp == NULL) {
return NULL;
}
argp[0] = strrchr(file, '/');
if(argp[0] != (char*) 0) {
if(argp[0] != NULL) {
++argp[0];
} else {
argp[0] = file;
}
argn = 1;
if(strchr(query, '=') == (char*) 0) {
if(strchr(query, '=') == NULL) {
for(cp1 = cp2 = query; *cp2 != '\0'; ++cp2) {
if(*cp2 == '+') {
*cp2 = '\0';
@@ -2133,7 +2133,6 @@ static void send_error_tail(void) {
}

static void send_redirect(char* extra_header, char* hostname, char* new_location, int is_ssl) {
int extra_length = 0;
char extra_header_buf[5000];
const char *sep = new_location[0] == '/' ? "" : "/";
const char *proto = is_ssl == 1 ? "https://" : "http://";

Loading…
Cancel
Save