Skip to content

Extract HTTPLUA and HTTPREXX into separate projects#62

Merged
mgrossmann merged 2 commits intomainfrom
issue-61-extract-lua-rexx
Apr 12, 2026
Merged

Extract HTTPLUA and HTTPREXX into separate projects#62
mgrossmann merged 2 commits intomainfrom
issue-61-extract-lua-rexx

Conversation

@mgrossmann
Copy link
Copy Markdown
Contributor

Summary

  • Remove Lua CGI handler and REXX CGI handler from HTTPD codebase
  • New standalone projects: mvslovers/httplua, mvslovers/httprexx
  • Remove lua370 dependency — HTTPD load module ~80KB smaller
  • Clean all Lua/REXX references from httpd.h, httpprm.c, httpd.c, httpdsrv.c
  • HTTPD struct offsets preserved (fields replaced with void *unused_*)
  • Add types.h to exported header artifacts (needed by CGI consumers)
  • Mark HTTPDSL and HTTPJES2 as deprecated in samplib

Verification

  • make build link succeeds for HTTPD
  • make build link succeeds for httplua (done, RC=0)
  • make build link succeeds for httprexx (done, RC=0)
  • HTTPLUA/HTTPREXX load as external CGI modules via Parmlib
  • Grep for HTTPLUAX/cgilua_/lua370 in source — zero hits

Fixes #61

Remove Lua CGI handler (httplua.c, httpluax.c, lauxlib.c, loadlib.c,
liolib.c, httpluax.h) and REXX CGI handler (httprexx.c, httpsay.c)
from the HTTPD codebase. These are now standalone projects:

- mvslovers/httplua — Lua CGI handler + HTTPLUAX function vector
- mvslovers/httprexx — REXX CGI handler + HTTPSAY helper

HTTPD changes:
- Remove lua370 dependency from project.toml
- Remove -DLUA_USE_C89 and -DLUA_USE_JUMPTABLE=0 from build flags
- Remove HTTPLUAX, HTTPLUA, HTTPSAY, HTTPREXX link modules
- Clean httpd.h: remove HTTPLUAX define, httpluax.h include,
  replace LUAX *luax and cgilua_* fields with void *unused_*
- Clean httpd.c: remove httpd->luax initialization
- Clean httpprm.c: remove CGILUA_* keyword handlers
- Clean httpdsrv.c: replace luax/cgilua_* display with reserved
- Clean samplib: remove HTTPLUA/HTTPREXX, mark HTTPDSL/HTTPJES2
  as deprecated
- Add types.h to exported header artifacts

Fixes #61
Add support for extension-based CGI patterns in the Parmlib
CGI configuration:

  CGI=MVSMF /zosmf/*       (URL prefix match, as before)
  CGI=HTTPLUA *.lua         (extension match, new)
  CGI=HTTPREXX *.rexx       (extension match, new)

When the CGI pattern starts with "*.", HTTPD constructs the full
UFS script path (DOCROOT + REQUEST_PATH) and passes it to the
CGI module via the SCRIPT_FILENAME environment variable.

The existing __patmat() wildcard matching already handles extension
patterns, so only httppc.c needed changes for SCRIPT_FILENAME
injection. No parser changes required.

Refs #61
@mgrossmann mgrossmann merged commit 21aa7bc into main Apr 12, 2026
1 check failed
@mgrossmann mgrossmann deleted the issue-61-extract-lua-rexx branch April 12, 2026 16:54
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.

[HTTPD 4.0.0] Extract HTTPLUA into separate project, remove lua370 dependency

1 participant