Skip to content

Sean Flannigan - C-Web-Server#301

Open
sean-one wants to merge 13 commits into
bloominstituteoftechnology:masterfrom
sean-one:master
Open

Sean Flannigan - C-Web-Server#301
sean-one wants to merge 13 commits into
bloominstituteoftechnology:masterfrom
sean-one:master

Conversation

@sean-one

Copy link
Copy Markdown

No description provided.

@codejoncode codejoncode left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

 int response_length = snprintf(response, max_response_size, "%s\n"
            "Content-Type: %s\n"
            // need to add DATE to response
            "Content-Length: %d\n"
            "Connection: close\n"
            "\n"
            "%s", header, content_type, content_length, body
            );

This part of your code is only going to work for the index.html. the cat.png might have an issue with the format specifier %s.

Two ways to approach this problem memcpy or make two send 's after removing the part of your header that includes the body.

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