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

Add some minor functionalities which were put off #4

Closed
1 task done
ryuju0911 opened this issue Jan 24, 2024 · 6 comments
Closed
1 task done

Add some minor functionalities which were put off #4

ryuju0911 opened this issue Jan 24, 2024 · 6 comments
Assignees

Comments

@ryuju0911
Copy link
Owner

ryuju0911 commented Jan 24, 2024

Background

I left some functionalities TODO when implementing client and server. They include Expect: 100-continue, Connection: keep-alive, HEAD method, etc.

Goal

I will add the functionalities described above. Also, I will add tests for server and client since I have already done with basic components.

Approach

Overview

I will implement them incrementally referring to the source code.

Todo

  • Essential components

Frequency

Weekly

Deadline

2024/2

References

net/http source code

Notes

None

@ryuju0911 ryuju0911 self-assigned this Jan 24, 2024
@ryuju0911
Copy link
Owner Author

Work Time

7h

Report

  • I enabled the server to handle Expect: 100-continue of HTTP header. It specifies a server sends a temporary response first indicating a server can accept the request. To ensure it is properly handled, I added tests and all of them passed successfully.

References

None

Notes

None

@ryuju0911
Copy link
Owner Author

Work Time

8h

Report

  • I enabled the server to handle Connection: keep-alive for HTTP/1.0. It specifies the server to reuse a connection instead of closing it after a request is processed. To support this feature, some unclear logic was used and I tried to understand them by reading related issues.

References

Notes

None

@ryuju0911
Copy link
Owner Author

Work Time

8h

Report

  • I completed the implementation of chunkWriter.writeHeader function. It writes status line, body, and trailer (if present) in the final request processing stage. A lot of logic is involved in writing them, and I learned them with reference to a RFC.

References

None

Notes

None

@ryuju0911
Copy link
Owner Author

Work Time

11h

Report

  • I added some functionalities such as Authorization header and rewinding request body to the client side. Also, I did further investigation on the logic of the client, but it is much more complex than one of the server. It seems that it will take time to understand how the client works.

References

None

Notes

None

@ryuju0911
Copy link
Owner Author

Work Time

12h

Report

  • Added functionalities
    • Parse URL paramters
    • Handle application/x-www-form-urlencoded and multipart/form-data headers
    • Handle Transfer-Encoding: gzip and uncompress body
    • Write chunked body with the correct format on the server
    • Read response body on the client

References

None

Notes

None

@ryuju0911
Copy link
Owner Author

Work Time

10h

Report

  • Added functionalities
    • Redirect
    • Dump response and request
    • Proxy (HTTP/1.x to HTTP/1.x)
  • Most of the minor functionalities have been implemented. So, I will start working on TLS next week.

References

None

Notes

None

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

No branches or pull requests

1 participant