Skip to content

Fix HTTP OPTIONS requests#980

Merged
r00t- merged 1 commit intovolkszaehler:masterfrom
cweiske:http-options
Oct 22, 2025
Merged

Fix HTTP OPTIONS requests#980
r00t- merged 1 commit intovolkszaehler:masterfrom
cweiske:http-options

Conversation

@cweiske
Copy link
Copy Markdown
Contributor

@cweiske cweiske commented Oct 17, 2025

Simply map OPTIONS to GET requests, just as nginx and apache do.

Resolves: #979

@r00t-
Copy link
Copy Markdown
Contributor

r00t- commented Oct 17, 2025

thanks so far!
will this respond to OPTIONS requests just like they were GET requests?
is this that the right behaviour? should we not construct a response specific to that method,
and specifically, as i have no idea what that would be, respond HTTP/405 method not supported?
i only wonder why that's not the default for Symfony when receiving an unsupported method request...

besides, shouldn't any http client that sends "exotic" requests be prepared for the server not supporting them?
(not saying that we can not add some support to increase compatibility.)

just as nginx and apache do

can you give more details? i can not see such behaviour anywhere...
e.g.:

$ curl -iX OPTIONS www.google.com
HTTP/1.1 405 Method Not Allowed

maybe somebody who knows more about the volkszaehler.org middleware can comment.

@cweiske
Copy link
Copy Markdown
Contributor Author

cweiske commented Oct 19, 2025

Let's discuss that in #979

Return the allowed HTTP methods and origins in response to OPTIONS requests.

HEAD requests are simply handled as GET requests.
At least Apache HTTP server removes the content and
only sends the headers over the line.

Resolves: volkszaehler#979
@jahir
Copy link
Copy Markdown
Member

jahir commented Oct 22, 2025

unless somebody objects, I will merge this

@r00t-
Copy link
Copy Markdown
Contributor

r00t- commented Oct 22, 2025

the updated implementation looks much better, thanks!

@r00t- r00t- merged commit b0b7cd3 into volkszaehler:master Oct 22, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

Error on HTTP OPTIONS requests

3 participants