Changeset 32005


Ignore:
Timestamp:
May 10, 2017, 11:37:39 AM (2 weeks ago)
Author:
brainslayer
Message:

content length must be 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/httpd.c

    r32001 r32005  
    326326
    327327        // jimmy, https, 8/4/2003, fprintf -> wfprintf, fflush -> wfflush
    328         send_headers(status, title, extra_header, "text/html", 0, NULL);
     328        send_headers(status, title, extra_header, "text/html", -1, NULL);
    329329        (void)wfprintf(conn_fp, "<HTML><HEAD><TITLE>%d %s</TITLE></HEAD>\n<BODY BGCOLOR=\"#cc9999\"><H4>%d %s</H4>\n", status, title, status, title);
    330330        (void)wfprintf(conn_fp, "%s\n", text);
     
    354354        if (extra_header != (char *)0 && *extra_header)
    355355                wfprintf(conn_fp, "%s\r\n", extra_header);
    356         if (length != 0)
     356        if (length != -1)
    357357                wfprintf(conn_fp, "Content-Length: %ld\r\n", length);
    358358        wfprintf(conn_fp, "\r\n");
     
    860860                        fprintf(stderr, "[HTTP PATH] %s redirect\n", file);
    861861                        sprintf(redirect_path, "Location: http://%s/detect.asp", nvram_get("lan_ipaddr"));
    862                         send_headers(302, "Found", redirect_path, "", 0, NULL);
     862                        send_headers(302, "Found", redirect_path, "", -1, NULL);
    863863                        return;
    864864
     
    10651065                                                if (handler->output != do_file)
    10661066                                                        if (handler->send_headers)
    1067                                                                 send_headers(200, "Ok", handler->extra_header, handler->mime_type, 0, NULL);
     1067                                                                send_headers(200, "Ok", handler->extra_header, handler->mime_type, -1, NULL);
    10681068                                        }
    10691069                                        memdebug_leave_info("auth_output");
Note: See TracChangeset for help on using the changeset viewer.