Skip to content

add HTTP query, form and cookie support - #29

Merged
funlang merged 1 commit into
mainfrom
feat-fun-http-core
Oct 22, 2026
Merged

funlang merged 1 commit into
mainfrom
feat-fun-http-core

Conversation

@taadis

@taadis taadis commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

新增 http 常用方法实现

fun/lib/http-server.fun:

  • req.query(k) URL 解码(%XX/+)
  • req.form() 解析 urlencoded body
  • req.cookies / req.cookie(k)
  • res.cookie() / res.clearCookie()(Path/Domain/Max-Age/Expires/HttpOnly/Secure/SameSite)
  • res.addHeader() 多值头(Set-Cookie/Vary 等),受控 CRLF 拼接
  • res.header/addHeader CR/LF 校验;cookie 属性校验;redirect Location 校验
  • 处理 Fun 的 '' = nil、0 = nil 空值问题

@funlang
funlang merged commit dd66f3f into main Oct 22, 2026
5 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.

2 participants