Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C-Web-Server - Scott Bren #303

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

smbren
Copy link

@smbren smbren commented Mar 11, 2019

C-Web-Server - Scott Bren

@Tulf

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

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

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

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