• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / valkyrja-java / 30323111914 / 1
100%
26.x: 100%

Build:
DEFAULT BRANCH: 26.x
Ran 28 Jul 2026 02:27AM UTC
Files 655
Run time 15s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jul 2026 02:26AM UTC coverage: 99.977%. Remained the same
30323111914.1

push

github

web-flow
[Http] Derive parsed body, uploaded files, and query from the raw body in fromGlobals (#54)

# Description

Makes `RequestFactory.fromGlobals` do the job its name implies: split a
request's raw inputs into the request object's parts. It now derives the
query params, cookies, parsed form body, and uploaded files — and sets
the raw body stream — from just the server params and the raw body.

PHP's `fromGlobals` receives `$_POST` and `$_FILES` already parsed **by
the SAPI**, so it never had to parse a body itself. The raw Java
runtimes (JDK `HttpServer`, Netty, servlet containers) have no SAPI —
they hand over only raw bytes — so nothing populated those slots and
`getParsedBody()` / `getUploadedFiles()` came back empty on every form
post and file upload, in both the CGI `Http` entry and the worker
entries. The parsing PHP delegates has to happen at the build site, and
`fromGlobals` is that single site.

Because none of those inputs are pre-parsed in Java, the signature also
collapses: `fromGlobals(server, query, body, cookies, files)` becomes
**`fromGlobals(server, body)`** (same for `jsonFromGlobals`). Everything
else is derived:

- **query** ← the `QUERY_STRING` server param
- **cookies** ← the `Cookie` header (already the behavior, now
unconditional)
- **parsed body + uploaded files** ← the raw body, keyed off
`Content-Type`
- **body stream** ← the raw body

This also removes a duplication introduced in #50:
`WorkerHttp.parseQueryString` is gone, since query-string decoding is
the same `application/x-www-form-urlencoded` decoding the body parser
already does, and `WorkerHttp.request(...)` now just hands the server
map and raw body to the factory instead of building a request and
re-attaching a body with `withBody`.

Follows #45 and #50.

## A note on binary uploads

Multipart file parts are exposed as `UploadedFile`s (client filename,
media type, size, content stream, `moveTo`). Fidelity for **binary**
file content is bounded by an existing framework-... (continued)

1898 of 1900 branches covered (99.89%)

Branch coverage included in aggregate %.

6897 of 6897 relevant lines covered (100.0%)

4.34 hits per line

Source Files on job 30323111914.1
  • Tree
  • List 655
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 30323111914
  • 20596a15 on github
  • Prev Job for on 26.x (#30322506389.1)
  • Next Job for on 26.x (#30325166727.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc