Skip to content

Probe HttpHeaders.Contains('') shapes and HttpContent stream writes (al-runner 8728) - #1556

Open
StefanMaron wants to merge 6 commits into
masterfrom
probe-http-contains-stream-8728
Open

StefanMaron wants to merge 6 commits into
masterfrom
probe-http-contains-stream-8728

Conversation

@StefanMaron

Copy link
Copy Markdown
Collaborator

Probes for HttpHeaders.Contains('') on every header collection a program can reach, and for writes to HttpContent from a stream. AL Runner needs these cells for aldevtools/BusinessCentral.AL.Runner#8728 (and #7870).

This PR also carries the cells of #1424 (Probe empty HTTP header names and stream writes, by bstaeheli): tests/al-language/http/HttpHeaders.al and tests/al-language/http/content/HttpContent.al are that diff, applied onto master. If #1424 merges first, this PR's diff shrinks to the three new files.

New files

File Codeunit Cells
tests/al-language/http/headers/ContainsEmptyShapes.al 70886 Contains('') after add/remove, clear, Content-Type removed and added again, one or two text writes, a stream write, write then clear, a copy of written content, response content never sent, TryAddWithoutValidation, Set-Cookie, client settings (old and new handle, AddCertificate), secret content, content after ReadAs text and stream, request content assigned from written or fresh content, failed call response and request, text writes after Send (BC 28 and later)
tests/al-language/http/content/WriteStreamShapes.al 70887 Content headers after a stream write: after ReadAs then remove or clear, re-added types, other headers next to it, never-written content, body handed out, secret header, request without content, assigned stream, stream already given to another content, stream of a record that is gone, stream not on a BLOB field, second stream write, stream position after the write (fresh, partly read, content read), stream write over secret content, ReadAs text with other charsets
tests/al-language-onprem/http/HttpHandlerResponseShapes.al 98064 Test HTTP handler: handler wrote content, handler set nothing, handler added a response header, handler falls through (failed call), handler wrote then falls through, handler sees request headers and content, handler reads its own response. Asserted on BC 29 only (#if BC29PLUS, the same pattern as AyHttpHandler.al); older majors discard the observation.

How the values were measured

All values were observed on local BC containers (27.5, 28.5, 29.0) and converted with the corpus writer tools. No value was typed by hand. Cells that only exist on BC 28 and later are behind #if BC28PLUS.

https://claude.ai/code/session_01B5GPNVCdMf7ByZez1YeU96

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.

1 participant