GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — Populate headers for HTTP OPTIONS requests by DavidPetkovsek · Pull Request #1062 · CrowCpp/Crow Conversation
Contributor
When running middleware for an HTTP OPTIONS request (for CORS for example). There is a bug where the headers from the request are not populated. Also referenced here: #721 (comment). The reason this occurs is because the parser will parse the URL first (before the headers) and in the The proposed changes will prevent us from exiting early in the It is also important to note that OPTIONS requests are fully handled within crow, and crow will never call a user defined OPTIONS route. I believe this Fixes #721.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
It is hanging on Line 2047 in 584560f
Which is testing an invalid HTTP packet. Causing the parser to report an error to do_read() here Crow/include/crow/http_connection.h Line 492 in 584560f
Which hangs. The unit test never hang before because the OPTIONS packet would stop parsing early at the url stage. From reading the unit tests file I believe this unit test was not designed to test an invalid packet. Correcting the packet causes that specific unit test to no longer hang. That being said, now one of the tests fail, so I will work on that. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Turns out it was the same thing as the previous comment. The unit test in question was failing because the result it was getting was empty. It was empty because an error was thrown ( The unit test never failed before because the OPTIONS packet would stop parsing early at the url stage. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@gittiver I believe this is ready for your review once again. :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ockets for websocket endpoints
|
^ rebased onto master |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Crow does not reply to browser preflight messages correctly when using CORs middleware
There was an error while loading. Please reload this page.