forked from nikhilm/qhttpserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix URL handling bug and improve URL parsing.
The URL callback was interpreting the data only from one call. The http parser may call it multiple times. Switched to using http_parser_parse_url and setting fields individually. Some of these fields are irrelevant in an http server (host, port, fragment), since well behaved clients won't send them, but we might as well handle them since there isn't a significant perf penalty to checking a few constants.
- Loading branch information
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters