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

inets: Document sending status with mod_esi #7411

Merged

Conversation

jchristgit
Copy link
Contributor

I think this was previously undocumented because of its roots in CGI (https://stackoverflow.com/questions/25800385/how-to-send-response-headers-and-status-from-cgi-scripts), but I figured it would be nice to explicitly mention it in the docs regardless.
A test for this is already done as part of httpd_SUITE:esi, line 949:

    ok = http_status("GET /cgi-bin/erl/httpd_example:new_status_and_location ",
                     Config, [{statuscode, 201},
                              {header, "location"}]).

which calls src/http_server/httpd_example.erl, doing:

new_status_and_location(SessionID, Env, Input) ->
    mod_esi:deliver(SessionID, new_status_and_location(Env, Input)).

new_status_and_location(_Env,_Input) ->
  "status:201 Created\r\n Location: http://www.yahoo.com\r\n\r\n".

@github-actions
Copy link
Contributor

github-actions bot commented Jun 17, 2023

CT Test Results

    2 files    21 suites   14m 6s ⏱️
336 tests 331 ✔️ 5 💤 0
561 runs  553 ✔️ 8 💤 0

Results for commit ec373d4.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Jun 19, 2023
@IngelaAndin IngelaAndin self-assigned this Jun 21, 2023
@IngelaAndin
Copy link
Contributor

At first glance this looks good. Even if we are thinking about maybe removing ordinary CGI support (not decided) ESI support will still be part of what we want to keep. Things will however slow down a little due to summer vacation period, so merge decision may take longer than usual, please have patience.

@IngelaAndin IngelaAndin added this to the OTP-26.1 milestone Aug 3, 2023
@IngelaAndin IngelaAndin merged commit 1e4b006 into erlang:master Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants