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