瀏覽代碼

Update HTTP Daemon

master
belliash 7 年之前
父節點
當前提交
79185ea0b4
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. +4
    -5
      kuhttpd.c

+ 4
- 5
kuhttpd.c 查看文件

@@ -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…
取消
儲存