mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Update redbean api definitions (#652)
This commit is contained in:
parent
59ac141e49
commit
7bc24888fe
4 changed files with 349 additions and 38 deletions
|
@ -6,7 +6,7 @@ local function main()
|
|||
end
|
||||
SetStatus(200)
|
||||
SetHeader("Content-Type", GetHeader("Content-Type") or "text/plain")
|
||||
Write(GetPayload())
|
||||
Write(GetBody())
|
||||
end
|
||||
|
||||
main()
|
||||
|
|
|
@ -57,7 +57,7 @@ local function main()
|
|||
|
||||
Write('<dt>Payload\r\n')
|
||||
Write('<dd><p>')
|
||||
Write(EscapeHtml(VisualizeControlCodes(GetPayload())))
|
||||
Write(EscapeHtml(VisualizeControlCodes(GetBody())))
|
||||
Write('\r\n')
|
||||
|
||||
Write('</dl>\r\n')
|
||||
|
|
|
@ -72,11 +72,11 @@ local function main()
|
|||
-- redbean command line arguments
|
||||
-- these come *after* the c getopt server arguments
|
||||
Write('<h3>command line arguments</h3>\r\n')
|
||||
if #argv > 0 then
|
||||
if #arg > 0 then
|
||||
Write('<ul>\r\n')
|
||||
for i = 1,#argv do
|
||||
for i = 1,#arg do
|
||||
Write('<li>')
|
||||
Write(EscapeHtml(VisualizeControlCodes(argv[i])))
|
||||
Write(EscapeHtml(VisualizeControlCodes(arg[i])))
|
||||
Write('\r\n')
|
||||
end
|
||||
Write('</ul>\r\n')
|
||||
|
@ -333,9 +333,9 @@ local function main()
|
|||
Write('Size: ')
|
||||
Write(tostring(GetAssetSize(paths[i])))
|
||||
Write('<br>\r\n')
|
||||
if GetComment(paths[i]) then
|
||||
if GetAssetComment(paths[i]) then
|
||||
Write('Comment: ')
|
||||
Write(EscapeHtml(VisualizeControlCodes(GetComment(paths[i]))))
|
||||
Write(EscapeHtml(VisualizeControlCodes(GetAssetComment(paths[i]))))
|
||||
Write('<br>\r\n')
|
||||
end
|
||||
Write('\r\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue