Added more information towards dynamic pages
This commit is contained in:
@@ -133,7 +133,7 @@ static int processField(Connection *conn) {
|
||||
"Content-Length") == 0)
|
||||
conn->bodylen = atol(conn->fields[i].value);
|
||||
}
|
||||
conn->body = malloc(conn->bodylen + 1);
|
||||
conn->body = malloc(conn->bodylen);
|
||||
if (conn->body == NULL)
|
||||
return 1;
|
||||
conn->receivedBody = 0;
|
||||
|
||||
@@ -162,6 +162,8 @@ static int linkedResponse(Connection *conn,
|
||||
request.fields = conn->fields;
|
||||
request.path = conn->path;
|
||||
request.type = conn->type;
|
||||
request.body = conn->body;
|
||||
request.bodylen = conn->bodylen;
|
||||
|
||||
code = getResponse(&request, &response);
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ typedef struct {
|
||||
Field *fields;
|
||||
char *path;
|
||||
RequestType type;
|
||||
void *body;
|
||||
size_t bodylen;
|
||||
} Request;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user