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

Web Server Project - Farhan #312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Web Server Project - Farhan #312

wants to merge 1 commit into from

Conversation

farhanf
Copy link

@farhanf farhanf commented Mar 11, 2019

No description provided.

Copy link

@codejoncode codejoncode left a comment

Choose a reason for hiding this comment

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

No loop needed.

    struct tm *ltime = localtime(&t1);

    int response_length = sprintf(response,
        "%s\n"
        "Date: %s" // asctime adds its own newline
        "Connection: close\n"
        "Content-Length: %d\n"
        "Content-Type: %s\n"
        "\n", // End of HTTP header

        header,
        asctime(ltime),
        content_length,
        content_type
    )```   
example code. 

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