Skip to content

feat: replace Lua config with Parmlib parser (DD:HTTPPRM)#41

Merged
mgrossmann merged 1 commit intomainfrom
issue-40-parmlib-config
Apr 8, 2026
Merged

feat: replace Lua config with Parmlib parser (DD:HTTPPRM)#41
mgrossmann merged 1 commit intomainfrom
issue-40-parmlib-config

Conversation

@mgrossmann
Copy link
Copy Markdown
Contributor

Summary

  • Replace Lua-based httpconf.c (1286 lines) with KEY=VALUE Parmlib parser httpprm.c (540 lines)
  • Reads from DD:HTTPPRM — same pattern as FTPD (DD:FTPDPRM) and UFSD (DD:UFSDPRM)
  • No CGIs registered by default — all CGIs must be explicitly configured via CGI=PROGRAM /path/*
  • No MQTT or embedded FTPD initialization (confirmed 4.0.0 removals)
  • HTTPD struct: lua_State *configvoid *unused_60 (offset-stable)
  • New samplib/ with STC proc and sample Parmlib member

Fixes #40

Test plan

  • Build RC=0 (150 modules)
  • Link RC=0 (13 load modules)
  • Server starts with Parmlib (all CGIs registered)
  • mvsMF reachable via /zosmf/*
  • /.dsrv server display works
  • Server starts without DD:HTTPPRM (defaults, warning)
  • Lua CGI (/lua/*) still works

Replace the Lua-based httpconf.c (1286 lines) with a line-based
KEY=VALUE Parmlib parser httpprm.c (540 lines) that reads from
DD:HTTPPRM.  Follows the same pattern as FTPD and UFSD.

- New src/httpprm.c: reads DD:HTTPPRM, KEY=VALUE format, comments
  with # or *, missing DD starts with defaults (warning)
- Delete src/httpconf.c: Lua config engine removed
- CGI registration via CGI=PROGRAM /path/* lines (no defaults)
- No MQTT or embedded FTPD initialization (confirmed removals)
- Socket bind with retry logic preserved from httpconf.c
- All settings carried over: PORT, MINTASK, MAXTASK, CLIENT_TIMEOUT,
  LOGIN, TZOFFSET, DEBUG, UFS, DOCROOT, CODEPAGE, BIND_TRIES,
  BIND_SLEEP, LISTEN_QUEUE, CGI, CGILUA_*, CLIENT_STATS_*, etc.

HTTPD struct changes:
- lua_State *config → void *unused_60 (preserve offsets)
- New fields: ufs_enabled, dbg_enabled, bind_tries, bind_sleep,
  listen_queue, codepage[16]

New samplib/ directory:
- samplib/httpd: STC JCL procedure (matching FTPD/UFSD pattern)
- samplib/httpprm0: sample Parmlib member with all settings

Fixes #40
@mgrossmann mgrossmann merged commit 6eb1638 into main Apr 8, 2026
1 check failed
@mgrossmann mgrossmann deleted the issue-40-parmlib-config branch April 8, 2026 16:18
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] Replace Lua config with Parmlib + remove Lua engine

1 participant