Skip to content

C-Web-Server - Scott Bren#303

Open
smbren wants to merge 11 commits into
bloominstituteoftechnology:masterfrom
smbren:master
Open

C-Web-Server - Scott Bren#303
smbren wants to merge 11 commits into
bloominstituteoftechnology:masterfrom
smbren:master

Conversation

@smbren

@smbren smbren commented Mar 11, 2019

Copy link
Copy Markdown

C-Web-Server - Scott Bren

@Tulf

Comment thread src/server.c Outdated
if(strcmp(endpoint, "/d20") == 0) {
get_d20(fd);
} else {
get_file(fd, cache, endpoint);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep you're getting the file at the right endpoint everything looks good

Comment thread src/server.c Outdated
resp_404(fd);
} else {
send_response(fd, "HTTP/1.1 200 OK", mime_type, filedata->data, filedata->size);
file_free(filedata);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep it's an annoying pattern but whatever you allocate you must free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants