Added reference to a relevant pull request in getreq() comment

This commit is contained in:
Sergey Lyubka 2013-10-01 19:09:29 +01:00
parent 87d841d81b
commit eedfedd13b
2 changed files with 2 additions and 0 deletions

View File

@ -3649,6 +3649,7 @@ static int getreq(struct mg_connection *conn, char *ebuf, size_t ebuf_len) {
// The reason for treating GET and POST/PUT differently is that libraries
// like jquery do not set Content-Length in GET requests, and we don't
// want mg_read() to hang waiting until socket is timed out.
// See https://github.com/cesanta/mongoose/pull/121 for more.
conn->content_len = INT64_MAX;
if (!mg_strcasecmp(conn->request_info.request_method, "GET")) {
conn->content_len = 0;

View File

@ -4960,6 +4960,7 @@ static int getreq(struct mg_connection *conn, char *ebuf, size_t ebuf_len) {
// The reason for treating GET and POST/PUT differently is that libraries
// like jquery do not set Content-Length in GET requests, and we don't
// want mg_read() to hang waiting until socket is timed out.
// See https://github.com/cesanta/mongoose/pull/121 for more.
conn->content_len = INT64_MAX;
if (!mg_strcasecmp(conn->request_info.request_method, "GET")) {
conn->content_len = 0;