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

Upgrade SimpleWebServer to version 2.1.1 #438

Merged
merged 4 commits into from
Mar 15, 2018

Conversation

withsmilo
Copy link
Collaborator

Currently Clipper uses SimpleWebServer(Oct 25, 2016) for http serving.
We need to upgrade this module to resolve some bugs and support keep-alive connection.
So we applied all patches except of some to reach version 2.1.1 (May 27, 2017).
Diff between SimpleWebServer v2.1.1(left). and SimpleWebServer(right) in this PR is here.

Currently Clipper uses SimpleWebServer([Oct 25, 2016](https://github.com/eidheim/Simple-Web-Server/tree/8e0d3142bfd3c4932d9c7a9b9fcd517b7a4ec05b)) for http serving.
We need to upgrade this module to resolve some bugs and support keep-alive connection.
So we applied all patches except of some to reach [version 2.1.1 (May 27, 2017)](https://github.com/eidheim/Simple-Web-Server/blob/v2.1.1/server_http.hpp).
Diff between SimpleWebServer v2.1.1(left). and SimpleWebServer(right) in this PR is [here](https://www.diffchecker.com/PI1eJFwo).

* applied patch list
  * Nov 7, 2016: [Fixes ucbrise#82: wrong reset method called in ::start](eidheim/Simple-Web-Server@8da3ad4)
  * Nov 10, 2016: [Fixed crash if server instance gets deleted after the call to io_serv](eidheim/Simple-Web-Server@743785b)
  * Nov 23, 2016: [Fixes ucbrise#86: can now set timeout on client requests](eidheim/Simple-Web-Server@8a73cb3)
  * Nov 23, 2016: [Minor timeout source cleanups](eidheim/Simple-Web-Server@7d95360)
  * Nov 23: 2016: [Simplified Server::parse_request](eidheim/Simple-Web-Server@0d8052d)
  * Dec 4, 2016: [string::substr comparisons replaced by string::compare](eidheim/Simple-Web-Server@14d848b)
  * Dec 13, 2016: [compile clean with gcc 4.6.3](eidheim/Simple-Web-Server@dc74f77)
  * Dec 19, 2016: [Added client verification when a verify file is passed to Server<HTTP](eidheim/Simple-Web-Server@7a97f82)
  * Dec 19, 2016: [Added error reporting through on_error std::function](eidheim/Simple-Web-Server@eef8a10)
  * Dec 19, 2016: [Minor cleanup](eidheim/Simple-Web-Server@d19244e)
  * Dec 19, 2016: [Minor cleanup](eidheim/Simple-Web-Server@db95a64)
  * Dec 29, 2016: [Cleanup of server-constructors. Previous constructors have been marked](eidheim/Simple-Web-Server@6c3a59d)
  * Dec 29, 2016: [Bugfix for last commit: config.timeout_content now correctly set in old constructor](eidheim/Simple-Web-Server@175d4dd#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Dec 30, 2016: [Fixed DEPRECATED macro in cases where it is already defined](eidheim/Simple-Web-Server@8c8ef39#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Dec 31, 2016: [Case insensitive header cleanup. Also cleanup and additions to parse_test](eidheim/Simple-Web-Server@549bc64#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Jan 1, 2017: [Added on_upgrade for cases where one wants to handle connection upgrades](eidheim/Simple-Web-Server@bfcb325#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Jan 11, 2017: [Fixed Boost.Regex workaround in regex_orderable. Fixes ucbrise#100](eidheim/Simple-Web-Server@19627bb#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Jan 24, 2017: [Possible implementation for fixing ucbrise#106](eidheim/Simple-Web-Server@600fbe3#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Jan 24, 2017: [Renamed close_connection_after_send to close_connection_after_response](eidheim/Simple-Web-Server@de560e8#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Feb 5, 2017: [Added query string parsing and member to request](eidheim/Simple-Web-Server@a4dd2e6#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Feb 5, 2017: [Travis CI build failed](eidheim/Simple-Web-Server@d554c13#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Feb 14, 2017: [remove locale dependent stof()](eidheim/Simple-Web-Server@50ce751#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * Feb 27, 2017: [If query string is present then cut it from the reqeust path so find](eidheim/Simple-Web-Server@e585a7a#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * May 6, 2017: [Added support for request header Connection: keep-alive (see ucbrise#123)](eidheim/Simple-Web-Server@cfafbcb#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * May 27, 2017: [Finished query string parsing implementation (PR ucbrise#109)](eidheim/Simple-Web-Server@550bbfe#diff-be05a8666afdaf0bcadd9499d09cf33c)
  * May 27, 2017: [Fixed g++ error in Server::Request::parse_query_string](eidheim/Simple-Web-Server@4469de1#diff-be05a8666afdaf0bcadd9499d09cf33c)

* excluded patch list
  * Jan 2, 2017: [Code simplification: got rid of opt_resource at minimal cost](eidheim/Simple-Web-Server@8cdebfb)
  * Jan 2, 2017: [Added warning to Server::resource](eidheim/Simple-Web-Server@fa8c381)
  * Jan 3, 2017: [Removed unnecessary public](eidheim/Simple-Web-Server@f5e65bf)
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@dcrankshaw
Copy link
Contributor

jenkins ok to test

Copy link
Contributor

@dcrankshaw dcrankshaw left a comment

Choose a reason for hiding this comment

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

This looks great. Thanks for contributing! I'll merge once the tests pass.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1120/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1122/
Test FAILed.

@dcrankshaw
Copy link
Contributor

@withsmilo The formatter can be a little finicky. I just formatted and pushed to this branch, so it should clear the format checker now.

@withsmilo
Copy link
Collaborator Author

@dcrankshaw
Thank you. The formatter seems to have varying behavior across versions or systems.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1123/
Test FAILed.

@withsmilo
Copy link
Collaborator Author

I will check run_unittests.sh.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1124/
Test PASSed.

@dcrankshaw dcrankshaw merged commit 1ed8f3a into ucbrise:develop Mar 15, 2018
@withsmilo withsmilo deleted the upgrade_simple_web_server branch March 15, 2018 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants