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

[Question] HTTP/1.1, HTTP/2 and HTTP/3 support #1190

Closed
adeko opened this issue May 3, 2020 · 1 comment
Closed

[Question] HTTP/1.1, HTTP/2 and HTTP/3 support #1190

adeko opened this issue May 3, 2020 · 1 comment

Comments

@adeko
Copy link

adeko commented May 3, 2020

I've noticed some protocol checks for HTTP/1.1.

web.php
&& preg_grep('/HTTP\/\d\.\d 200/',$response['headers'])
preg_grep('/HTTP\/1\.\d 3\d{2}/',$headers) &&
if (preg_match('/HTTP\/1\.\d 304/',

ws.php
if (preg_match('/^(\w+)\s(.+)\sHTTP\/1\.\d$/',
'HTTP/1.1 400 Bad Request'.$EOL.

Etc.

[Question] We already have HTTP/1.1, HTTP/2 and HTTP/3. Should this code be updated?

E.g.
preg_grep('/HTTP\/\d\.\d 200/',$response['headers'])
replace with
preg_grep('/HTTP\/[\d\.]{1,3} 200/',$response['headers'])

ikkez added a commit to f3-factory/fatfree-core that referenced this issue May 26, 2020
@ikkez
Copy link
Collaborator

ikkez commented May 26, 2020

No bad idea.. fixed in f3-factory/fatfree-core@39380a1

@ikkez ikkez closed this as completed May 26, 2020
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

2 participants